diff --git a/lib/net/pool.js b/lib/net/pool.js index ac97a000..da875c93 100644 --- a/lib/net/pool.js +++ b/lib/net/pool.js @@ -288,6 +288,9 @@ class Pool extends EventEmitter { */ async _disconnect() { + for (const item of this.invMap.values()) + item.resolve(); + if (!this.connected) return; diff --git a/test/wallet-test.js b/test/wallet-test.js index 669a8841..e48305df 100644 --- a/test/wallet-test.js +++ b/test/wallet-test.js @@ -1618,7 +1618,8 @@ describe('Wallet', function() { }); } - it('should cleanup', () => { + it('should cleanup', async () => { consensus.COINBASE_MATURITY = 100; + // await wdb.close(); }); });