net: properly clear timers.

This commit is contained in:
Christopher Jeffrey 2018-08-10 06:40:49 -07:00
parent a0ac953079
commit dc5b8c373d
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 5 additions and 1 deletions

View File

@ -288,6 +288,9 @@ class Pool extends EventEmitter {
*/
async _disconnect() {
for (const item of this.invMap.values())
item.resolve();
if (!this.connected)
return;

View File

@ -1618,7 +1618,8 @@ describe('Wallet', function() {
});
}
it('should cleanup', () => {
it('should cleanup', async () => {
consensus.COINBASE_MATURITY = 100;
// await wdb.close();
});
});