mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-28 16:31:35 +00:00
fix: start and stop connection manager with libp2p
test: add test to verify libp2p starts and stops the right things test: add test for verifying disabled modules fix: linting
This commit is contained in:
10
src/index.js
10
src/index.js
@ -146,7 +146,10 @@ class Node extends EventEmitter {
|
||||
})
|
||||
|
||||
series([
|
||||
(cb) => this._switch.start(cb),
|
||||
(cb) => {
|
||||
this.connectionManager.start()
|
||||
this._switch.start(cb)
|
||||
},
|
||||
(cb) => {
|
||||
if (ws) {
|
||||
// always add dialing on websockets
|
||||
@ -256,7 +259,10 @@ class Node extends EventEmitter {
|
||||
}
|
||||
cb()
|
||||
},
|
||||
(cb) => this._switch.stop(cb),
|
||||
(cb) => {
|
||||
this.connectionManager.stop()
|
||||
this._switch.stop(cb)
|
||||
},
|
||||
(cb) => {
|
||||
this.emit('stop')
|
||||
cb()
|
||||
|
Reference in New Issue
Block a user