tradle / react-native-udp

node's dgram for react-native
MIT License
341 stars 154 forks source link

Broadcast stops on network change #256

Open bartoszboruta opened 2 months ago

bartoszboruta commented 2 months ago

Description

It seems like broadcast stops on network change without throwing an error or close callback.

Steps to reproduce

Steps to reproduce the behavior:

  1. Setup
    
    const port = 3333;
    const server = dgram.createSocket({
    reusePort: true,
    debug: true,
    type: 'udp4',
    });

server.bind(port);

server.setBroadcast(true);

setInterval(() => { server.send(...) with port 3333 and address 255.255.255.255 }, 5000)



2. Observe responses in server.on("message") listener
3. Change wifi network or close wifi to use network data
4. Go back to the app
5. No more responses in message listener, "close" and "error" listeners was not called
6. `server.send` callback is not called

## Relevant information
|             |     |
| ----------- | --- |
| OS |   ios/android|
| react-native |    71|
| react-native-udp  |    4.1.7|
github-actions[bot] commented 1 month ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.

bartoszboruta commented 1 month ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.

Nothing changed