Skip to content

Commit

Permalink
cluster: default value of exitedAfterDisconnect changed to false
Browse files Browse the repository at this point in the history
The defaul value of worker.exitedAfterDisconnect is undefined. If the
worker dies on its own the value is changed to false and doesn't
remains undefined. While the documentation just mentions 'Set by
calling .kill() or .disconnect(). Until then, it is undefined.'.
Making the default value as false in worker.js

Fixes: nodejs#28837
Refs: nodejs#3743
  • Loading branch information
nimit95 committed Jul 26, 2019
1 parent e9ea8ea commit e9a3db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/cluster/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function Worker(options) {
if (options === null || typeof options !== 'object')
options = {};

this.exitedAfterDisconnect = undefined;
this.exitedAfterDisconnect = false;

this.state = options.state || 'none';
this.id = options.id | 0;
Expand Down

0 comments on commit e9a3db6

Please sign in to comment.