Skip to content

Broadcast stops on network change #256

@bartoszboruta

Description

@bartoszboruta

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)
  1. Observe responses in server.on("message") listener
  2. Change wifi network or close wifi to use network data
  3. Go back to the app
  4. No more responses in message listener, "close" and "error" listeners was not called
  5. server.send callback is not called

Relevant information

OS ios/android
react-native 71
react-native-udp 4.1.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions