fix: cascading connection from encrypted connection to parent connection

This commit is contained in:
Pedro Teixeira 2018-02-22 15:46:34 +00:00 committed by David Dias
parent 7c2b7a9571
commit e205ca40f1

View File

@ -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))