Skip to content

Commit 7f7c50b

Browse files
committed
Fix for Issue #174 (exception seen in Travis)
The issue is documented here: #174 The variable 'worker' being accessed at line# 279 is being obtained using a look-up into the 'workers' variable where the key to lookup is coming from '_workers'. It seems '_workers' and 'workers' are not in sync, and the key obtained from '_workers' does not exist in 'workers' causing the exception. Though any race conditions causing this being identified and eliminated should be the ideal fix; however, it was also seen that extending the check at line# 279 from 'if(worker.launched)' to 'if(!worker || worker.launched)' does not cause any side effect on the code following this if block, because all this if block does is to return (stop processing this 'worker'). Ideally, if 'worker' does not even exist, that is equally good reason to stop processing as well, and that's my logic for the statement that 'no side effects are caused'.
1 parent a0607b6 commit 7f7c50b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ var statusPoller = {
276276
}).forEach(function(_worker) {
277277
var workerData = workerKeys[_worker.id];
278278
var worker = workers[workerData.key];
279-
if (worker.launched) {
279+
if (!worker || worker.launched) {
280280
return;
281281
}
282282

0 commit comments

Comments
 (0)