mirror of
https://github.com/waku-org/js-waku.git
synced 2025-02-17 06:47:29 +00:00
Do not setup libp2p discovery module if we fail to retrieve node addrs
This commit is contained in:
parent
ff829fc43e
commit
d18c6eca83
@ -202,14 +202,14 @@ export class Waku {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bootstrap !== undefined) {
|
if (bootstrap !== undefined) {
|
||||||
|
try {
|
||||||
|
const list = await bootstrap();
|
||||||
|
|
||||||
// Note: this overrides any other peer discover
|
// Note: this overrides any other peer discover
|
||||||
libp2pOpts.modules = Object.assign(libp2pOpts.modules, {
|
libp2pOpts.modules = Object.assign(libp2pOpts.modules, {
|
||||||
peerDiscovery: [Bootstrap],
|
peerDiscovery: [Bootstrap],
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
|
||||||
const list = await bootstrap();
|
|
||||||
|
|
||||||
libp2pOpts.config.peerDiscovery = {
|
libp2pOpts.config.peerDiscovery = {
|
||||||
[Bootstrap.tag]: {
|
[Bootstrap.tag]: {
|
||||||
list,
|
list,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user