Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc,cluster: fix the lint of an example #6516

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ Similar to the `cluster.on('exit')` event, but specific to this worker.
```js
const worker = cluster.fork();
worker.on('exit', (code, signal) => {
if( signal ) {
if (signal) {
console.log(`worker was killed by signal: ${signal}`);
} else if( code !== 0 ) {
} else if (code !== 0) {
console.log(`worker exited with error code: ${code}`);
} else {
console.log('worker success!');
Expand Down Expand Up @@ -285,7 +285,7 @@ if (cluster.isMaster) {
server.listen(8000);

process.on('message', (msg) => {
if(msg === 'shutdown') {
if (msg === 'shutdown') {
// initiate graceful close of any connections to server
}
});
Expand Down