mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-13 17:21:21 +00:00
feat: update to the latest switch (#336)
This commit is contained in:
@ -274,13 +274,12 @@ class Node extends EventEmitter {
|
||||
this._getPeerInfo(peer, (err, peerInfo) => {
|
||||
if (err) { return callback(err) }
|
||||
|
||||
const connFSM = this._switch.dialFSM(peerInfo, protocol, (err) => {
|
||||
this._switch.dialFSM(peerInfo, protocol, (err, connFSM) => {
|
||||
if (!err) {
|
||||
this.peerBook.put(peerInfo)
|
||||
}
|
||||
callback(err, connFSM)
|
||||
})
|
||||
|
||||
callback(null, connFSM)
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user