Skip to content

Commit

Permalink
Fix for doxout#48.
Browse files Browse the repository at this point in the history
  • Loading branch information
vhadianto committed Oct 7, 2019
1 parent 7d8539d commit 5a2a2a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ module.exports = function(file, opt) {
var timeout = setTimeout(trykillfn, opt.timeout * 1000);
worker.once('exit', clearTimeout.bind(this, timeout));
// possible leftover worker that has no channel
// estabilished will throw. Ignore.
// established will throw. Ignore.
try {
if (worker.isConnected()) {
worker.send({cmd: 'disconnect'});
worker.disconnect();
}
} catch (e) { }
} else {
process.nextTick(trykillfn);
Expand Down

0 comments on commit 5a2a2a2

Please sign in to comment.