expected: client has an error/message "server closes the connection".
with noise network module:
server.on('connection', function (encryptedStream) {
throw new Error('boom')
// [...]
/Users/robert/bitfinex/hypertest/node_modules/noise-network/index.js:223
this.discovery.close()
^
TypeError: this.discovery.close is not a function
at NoiseAgent._close (/Users/robert/bitfinex/hypertest/node_modules/noise-network/index.js:223:20)
at NoiseAgent.Nanoresource.close (/Users/robert/bitfinex/hypertest/node_modules/nanoresource/index.js:95:8)
at NoiseAgent.Nanoresource.inactive (/Users/robert/bitfinex/hypertest/node_modules/nanoresource/index.js:64:33)
at RawStream._onclose (/Users/robert/bitfinex/hypertest/node_modules/noise-network/index.js:145:16)
at RawStream.emit (events.js:187:15)
at RawStream.Duplexify._destroy (/Users/robert/bitfinex/hypertest/node_modules/duplexify/index.js:199:8)
at /Users/robert/bitfinex/hypertest/node_modules/duplexify/index.js:182:10
at process._tickCallback (internal/process/next_tick.js:61:11)
expected: client has an error/message "server closes the connection".
with noise network module: