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:
Alex Potsides 2022-08-14 11:14:18 +01:00 committed by GitHub
parent 2262f81924
commit 886759b7fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -347,6 +347,9 @@ export class DefaultConnectionManager extends EventEmitter<ConnectionManagerEven
})
)
})
.catch(err => {
log.error(err)
})
.finally(() => {
this.connectOnStartupController?.clear()
})