From 6d09b472ec8d96040c54fbee630dc0b117a628bb Mon Sep 17 00:00:00 2001 From: Jacob Heun Date: Wed, 28 Mar 2018 20:47:11 +0200 Subject: [PATCH] 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 --- src/handshake/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handshake/index.js b/src/handshake/index.js index b73a1e2..521e4d3 100644 --- a/src/handshake/index.js +++ b/src/handshake/index.js @@ -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