From ea0621b2f672185fcc5001bd3d9ea67ed92333f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Didrik=20Nordstr=C3=B6m?= Date: Mon, 27 Apr 2020 03:07:30 -0700 Subject: [PATCH] fix: reset discovery services upon stop (#618) --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index 6f9067a4..1cc15a36 100644 --- a/src/index.js +++ b/src/index.js @@ -225,6 +225,8 @@ class Libp2p extends EventEmitter { await Promise.all(Array.from(this._discovery.values(), s => s.stop())) + this._discovery = new Map() + this.connectionManager.stop() await Promise.all([