workers: do not listen for close event.
This commit is contained in:
parent
b8f57df90c
commit
28d2f1478e
@ -65,16 +65,11 @@ Child.prototype.init = function init(file) {
|
||||
this.emit('error', err);
|
||||
});
|
||||
|
||||
this.child.on('exit', (code, signal) => {
|
||||
this.child.once('exit', (code, signal) => {
|
||||
children.delete(this);
|
||||
this.emit('exit', code == null ? -1 : code, signal);
|
||||
});
|
||||
|
||||
this.child.on('close', () => {
|
||||
children.delete(this);
|
||||
this.emit('exit', -1, null);
|
||||
});
|
||||
|
||||
this.child.stdin.on('error', (err) => {
|
||||
this.emit('error', err);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user