fix: pass the handshake failure on

Failed handshakes abort the connection but dont inform users of the failure properly. If a remote was not successfully negotiated this could cause a peerId missing issue
This commit is contained in:
Jacob Heun 2018-03-28 20:47:11 +02:00 committed by David Dias
parent 0e23874730
commit 6d09b472ec

View File

@ -24,7 +24,7 @@ module.exports = function handshake (state, callback) {
}
// signal when the handshake is finished so that plumbing can happen
callback()
callback(err)
})
return state.stream