Skip to content

Commit

Permalink
Do not remove server from listening set if announcer.start() throws
Browse files Browse the repository at this point in the history
  • Loading branch information
HDegroote committed Nov 20, 2024
1 parent 99830cb commit 8be0e58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ module.exports = class Server extends EventEmitter {
}

_gc () {
this.dht.listening.delete(this)
if (this.target) this.dht._router.delete(this.target)
}

Expand Down Expand Up @@ -117,6 +116,7 @@ module.exports = class Server extends EventEmitter {
} catch {}

this._gc()
this.dht.listening.delete(this)
this._clearAll()

await this._stopListening()
Expand Down

0 comments on commit 8be0e58

Please sign in to comment.