fix: clean up pending dials abort per feedback

This commit is contained in:
Jacob Heun
2019-12-10 13:48:34 +01:00
parent 43b98e64b6
commit 7c3371bf17
4 changed files with 66 additions and 17 deletions

View File

@ -199,9 +199,7 @@ class Libp2p extends EventEmitter {
this._dht && this._dht.stop()
])
for (const dial of this.dialer.pendingDials.values()) {
dial.abort()
}
this.dialer.destroy()
await this.transportManager.close()
await this.registrar.close()