react-native-ssdp icon indicating copy to clipboard operation
react-native-ssdp copied to clipboard

null is not an object (evaluating 'self.sock.address')

Open jasonbodily opened this issue 4 years ago • 2 comments

SSDP.prototype._start adds listeners, but SSDP.prototype._stop doesn't remove them. The result is sock can be null when 'listening' is called. Should the client.stop() method remove listeners?

jasonbodily avatar Mar 23 '20 21:03 jasonbodily

@jasonbodily Did you end up making a code change to fix this?

jedashford avatar Oct 30 '20 02:10 jedashford

I did in our local code (a kind of hack), by calling removeAllListeners() on the socket before stopping it.

jasonbodily avatar Nov 03 '20 22:11 jasonbodily