mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-04-24 18:12:14 +00:00
fix: catch errors when reconnecting old peers (#1352)
Since we don't wait for successful reconnection to existing peers, the peerstore can be closed while we're accessing it since we might be shut down right after we've started up, e.g. during test runs so just log any reconnect errors instead of throwing.
This commit is contained in:
parent
2262f81924
commit
886759b7fb
@ -347,6 +347,9 @@ export class DefaultConnectionManager extends EventEmitter<ConnectionManagerEven
|
||||
})
|
||||
)
|
||||
})
|
||||
.catch(err => {
|
||||
log.error(err)
|
||||
})
|
||||
.finally(() => {
|
||||
this.connectOnStartupController?.clear()
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user