8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
disconnect()
1 parent 78e5c71 commit 4cb9a12Copy full SHA for 4cb9a12
lib/peerGroup.js
@@ -241,6 +241,7 @@ PeerGroup.prototype._connectToTCPPeers = function (cb) {
241
}
242
243
PeerGroup.prototype._onTCPPeerConnect = function (peer) {
244
+ if (this.disconnecting) return
245
peer.getTip = this.getTip
246
this._onPeerConnect(new Peer(peer))
247
@@ -262,6 +263,7 @@ PeerGroup.prototype._connectToWebPeers = function () {
262
263
264
265
PeerGroup.prototype._onWebPeerConnect = function (conn, incoming) {
266
267
var peer = new WebPeer(conn, { incoming: !!incoming, getTip: this.getTip })
268
peer.connect()
269
this._onPeerConnect(peer)
0 commit comments