1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

SIGINT handler should wait for stop to complete before exit

This commit is contained in:
Nick O'Leary 2018-01-25 14:04:38 +00:00
parent 22a5b339f7
commit e6369820a9
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

7
red.js
View File

@ -333,8 +333,7 @@ process.on('uncaughtException',function(err) {
});
process.on('SIGINT', function () {
RED.stop();
// TODO: need to allow nodes to close asynchronously before terminating the
// process - ie, promises
process.exit();
RED.stop().then(function() {
process.exit();
});
});