diff --git a/bin/node b/bin/node index 48b835e1..d9d1551f 100755 --- a/bin/node +++ b/bin/node @@ -45,6 +45,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 4608468b..b9499c57 100755 --- a/bin/spvnode +++ b/bin/spvnode @@ -33,6 +33,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/package.json b/package.json index 13d5bc47..761b0e80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fcoin", - "version": "1.0.1", + "version": "1.0.2", "description": "Flo bike-shed", "license": "MIT", "repository": "git://github.com/oipwg/fcoin.git",