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.
this._tcp.address()
can actually benull
, see net's source code and I ran into this corner case with a library of mine that usesdiscovery-swarm
. Apparently the underlyingdiscovery-channel
still knows how toleave
the channel in case the port is falsy.