From 640a672257b46f3eb4c49a565b82d93993ea0a80 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Tue, 21 Sep 2021 14:22:23 +1000 Subject: [PATCH] Do not setup libp2p discovery module if we fail to retrieve node addrs --- src/lib/waku.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/waku.ts b/src/lib/waku.ts index 55833a6350..286cd3487e 100644 --- a/src/lib/waku.ts +++ b/src/lib/waku.ts @@ -202,14 +202,14 @@ export class Waku { } if (bootstrap !== undefined) { - // Note: this overrides any other peer discover - libp2pOpts.modules = Object.assign(libp2pOpts.modules, { - peerDiscovery: [Bootstrap], - }); - try { const list = await bootstrap(); + // Note: this overrides any other peer discover + libp2pOpts.modules = Object.assign(libp2pOpts.modules, { + peerDiscovery: [Bootstrap], + }); + libp2pOpts.config.peerDiscovery = { [Bootstrap.tag]: { list,