workers: minor.

This commit is contained in:
Christopher Jeffrey 2017-07-15 23:59:45 -07:00
parent 4eb3c2172d
commit 94b5487847
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -118,8 +118,9 @@ WorkerPool.prototype.spawn = function spawn(id) {
child.on('exit', (code) => {
this.emit('exit', code, child);
if (this.children.get(child.id) === child)
this.children.delete(child.id);
if (this.children.get(id) === child)
this.children.delete(id);
});
child.on('event', (items) => {