mafintosh / discovery-swarm

A network swarm that uses discovery-channel to find peers
MIT License
375 stars 57 forks source link

Fix leave() to not crash upon null address #50

Closed staltz closed 5 years ago

staltz commented 5 years ago

this._tcp.address() can actually be null, see net's source code and I ran into this corner case with a library of mine that uses discovery-swarm. Apparently the underlying discovery-channel still knows how to leave the channel in case the port is falsy.

martinheidegger commented 5 years ago

LGTM but: https://travis-ci.org/mafintosh/discovery-swarm/jobs/429761576

staltz commented 5 years ago

@martinheidegger A simple CI restart fixed it.