diff --git a/lib/node/fullnode.js b/lib/node/fullnode.js index d7daa0a3..b2000434 100644 --- a/lib/node/fullnode.js +++ b/lib/node/fullnode.js @@ -252,8 +252,6 @@ class FullNode extends Node { await this.mempool.close(); await this.chain.close(); - this.logger.info('Node is closed.'); - await this.handleClose(); } diff --git a/lib/node/node.js b/lib/node/node.js index a8f9ecb4..099f4985 100644 --- a/lib/node/node.js +++ b/lib/node/node.js @@ -210,6 +210,8 @@ class Node extends EventEmitter { this.bound.length = 0; this.startTime = -1; + this.logger.info('Node is closed.'); + await this.workers.close(); await this.logger.close(); }