Closed hrivera2014 closed 5 years ago
With a ctrl-c
, SIGINT
handler will be called. If no custom SIGINT
handler was defined, process will exit
Thanks so much for reply to my, may be, obvious question. Ok I can handle the ctrl-c with a code like
process.on('SIGINT', function() {
console.log("Caught interrupt signal")
client.disconnect();
process.exit(0)
});
But if something else occur and the node.js process hang out, there will be some problem with the connections created at the sever. I don't know almost any thing about websockets or signalr. Thanks in advance.
Not sure what you mean by node.js process hang out. Connection will be automatically closed if process exits. The only thing which could happen if you don't call client.disconnect
manually is that node.js process won't exit until the connection is closed (unless ctrl-c
or kill
)
Ok, thanks so much for your willing to help and your time.
I has rewrited the code of one of your examples in order to connect to all BTC pairs what about if clien.disconnect does not happen. for intance by a ctrl-c.