Merge pull request #553 from braydonf/test-timeout
net: clear broadcast timers on pool close
This commit is contained in:
commit
7354fd3377
@ -191,6 +191,10 @@ class Pool extends EventEmitter {
|
||||
async close() {
|
||||
assert(this.opened, 'Pool is not open.');
|
||||
this.opened = false;
|
||||
|
||||
for (const item of this.invMap.values())
|
||||
item.resolve();
|
||||
|
||||
return this.disconnect();
|
||||
}
|
||||
|
||||
@ -288,9 +292,6 @@ class Pool extends EventEmitter {
|
||||
|
||||
this.disconnecting = true;
|
||||
|
||||
for (const item of this.invMap.values())
|
||||
item.resolve();
|
||||
|
||||
this.peers.destroy();
|
||||
|
||||
this.blockMap.clear();
|
||||
|
||||
@ -39,14 +39,14 @@
|
||||
"bmutex": "~0.1.0",
|
||||
"bn.js": "~4.11.8",
|
||||
"bsip": "~0.1.0",
|
||||
"bsock": "~0.1.0",
|
||||
"bsock": "~0.1.2",
|
||||
"bsocks": "~0.2.0",
|
||||
"bstring": "~0.1.0",
|
||||
"btcp": "~0.1.0",
|
||||
"bufio": "~0.2.0",
|
||||
"bupnp": "~0.2.1",
|
||||
"bval": "~0.1.0",
|
||||
"bweb": "~0.1.1",
|
||||
"bweb": "~0.1.3",
|
||||
"mrmr": "~0.1.0",
|
||||
"n64": "~0.2.0"
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user