From b090eb9649d5d2fcac0690064d85c9a3f9985816 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Sat, 5 May 2018 14:59:24 -0700 Subject: [PATCH] Close the open --- packages/truffle-core/cli.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/truffle-core/cli.js b/packages/truffle-core/cli.js index a165e622a9d..1edf1f668ed 100755 --- a/packages/truffle-core/cli.js +++ b/packages/truffle-core/cli.js @@ -40,12 +40,11 @@ command.run(process.argv.slice(2), options, function(err) { // Don't exit if no error; if something is keeping the process open, // like `truffle console`, then let it. - // Clear any polling though - `provider-engine` in HDWallet - // and `web3 1.0 confirmations` both interval timers wide open. - const Timer = process.binding('timer_wrap').Timer; + // Clear any polling or open sockets - `provider-engine` in HDWallet + // and `web3 1.0 confirmations` both leave interval timers etc wide open. const handles = process._getActiveHandles(); handles.forEach(handle => { - if (handle instanceof Timer){ + if (typeof handle.close === 'function'){ handle.close(); } })