Simplify the spawn handler and close the socket
This commit is contained in:
parent
e78c5b1576
commit
344ba31842
6
index.js
6
index.js
|
@ -14,9 +14,9 @@ const zmq = require('zeromq');
|
||||||
|
|
||||||
spawn(
|
spawn(
|
||||||
'minode', ['--request-queue', 'tcp://127.0.0.1:5566'],
|
'minode', ['--request-queue', 'tcp://127.0.0.1:5566'],
|
||||||
{timeout: 100000, killSignal: 'SIGTERM'}
|
{timeout: 100000, killSignal: 'SIGTERM', detached: true, stdio: 'inherit'}
|
||||||
).stderr.on('data', (data) => {
|
).on('exit', (c, s) => {
|
||||||
console.log(`${data}`);
|
sock.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
const sender = Address.fromRandom(),
|
const sender = Address.fromRandom(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user