diff --git a/src/index.js b/src/index.js index a7e480f..bd78e0a 100644 --- a/src/index.js +++ b/src/index.js @@ -35,7 +35,7 @@ module.exports = { if (err) { return callback(err) } conn.getPeerInfo((err, peerInfo) => { - encryptedConnection.setInnerConn(state.secure) + encryptedConnection.setInnerConn(new Connection(state.secure, conn)) if (err) { // no peerInfo yet, means I'm the receiver encryptedConnection.setPeerInfo(new PeerInfo(state.id.remote))