mirror of
https://github.com/fluencelabs/js-libp2p-secio
synced 2025-03-15 18:00:52 +00:00
fix: cascading connection from encrypted connection to parent connection
This commit is contained in:
parent
7c2b7a9571
commit
e205ca40f1
@ -35,7 +35,7 @@ module.exports = {
|
|||||||
if (err) { return callback(err) }
|
if (err) { return callback(err) }
|
||||||
|
|
||||||
conn.getPeerInfo((err, peerInfo) => {
|
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
|
if (err) { // no peerInfo yet, means I'm the receiver
|
||||||
encryptedConnection.setPeerInfo(new PeerInfo(state.id.remote))
|
encryptedConnection.setPeerInfo(new PeerInfo(state.id.remote))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user