diff --git a/bin/node b/bin/node index 091ebb8a..bc9693a5 100755 --- a/bin/node +++ b/bin/node @@ -46,6 +46,10 @@ process.on('unhandledRejection', (err, promise) => { throw err; }); +process.on('SIGINT', async () => { + await node.close(); +}); + (async () => { await node.ensure(); await node.open(); diff --git a/bin/spvnode b/bin/spvnode index ddc32841..e24a9d02 100755 --- a/bin/spvnode +++ b/bin/spvnode @@ -63,6 +63,10 @@ process.on('unhandledRejection', (err, promise) => { throw err; }); +process.on('SIGINT', async () => { + await node.close(); +}); + (async () => { await node.ensure(); await node.open(); diff --git a/bin/wallet b/bin/wallet index 8d3e282b..ce6f7120 100755 --- a/bin/wallet +++ b/bin/wallet @@ -38,6 +38,10 @@ process.on('unhandledRejection', (err, promise) => { throw err; }); +process.on('SIGINT', async () => { + await node.close(); +}); + (async () => { await node.ensure(); await node.open();