netbeast/react-native-ssdp

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

jasonbodily opened this issue · 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 Did you end up making a code change to fix this?

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