node-ssdp
node-ssdp copied to clipboard
Server.stop() fails to wait for 'bye' to complete before killing sockets.
The server.stop call does three things without any synchronization: sends out a bye stops the advertise loop closes sockets
The trouble is that _stop (closing sockets) is called without waiting for _send's callback to complete. So you will see the 'Sending a message to %s:%s' from _send, but you will don't see the 'Outgoing server message' from the completion in advertise. If I put a breakpoint before _stop, this message usually makes it out when I run.
I'm on win 10 with multiple NICs