Skip to content

Commit f064e1f

Browse files
committed
Renamed rebootWorkerOnError option to rebootWorkerOnCrash
1 parent 6f4b22b commit f064e1f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ var socketCluster = new SocketCluster({
116116
// balancerController: 'firewall.js', // Optional
117117
// storeController: 'store.js', // Optional
118118
// useSmartBalancing: true, // Optional - If true, load balancing will be based on session id instead of IP address. Defaults to false.
119-
rebootWorkerOnError: false, // Optional, makes debugging easier - Defaults to true (should be true in production),
119+
rebootWorkerOnCrash: false, // Optional, makes debugging easier - Defaults to true (should be true in production),
120120
addressSocketLimit: 50 // Optional, prevents malicious clients from hogging up unlimited sockets (memory) on your server - Defaults to 30
121121
});
122122
```

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ SocketCluster.prototype._init = function (options) {
4040
stores: null,
4141
appName: null,
4242
dataKey: null,
43-
rebootWorkerOnError: true,
43+
rebootWorkerOnCrash: true,
4444
protocol: 'http',
4545
protocolOptions: null,
4646
autoReconnect: true,
@@ -439,7 +439,7 @@ SocketCluster.prototype._handleWorkerExit = function (worker, code, signal) {
439439
this._leaderId = -1;
440440
this.errorHandler(new Error(message), {type: 'master'});
441441

442-
if (this.options.rebootWorkerOnError) {
442+
if (this.options.rebootWorkerOnCrash) {
443443
if (this.options.logLevel > 0) {
444444
this.log('Respawning worker ' + worker.id);
445445
}

sample/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ var socketCluster = new SocketCluster({
1111
storeController: __dirname + '/store.js',
1212
addressSocketLimit: 0,
1313
socketEventLimit: 100,
14-
rebootWorkerOnError: true,
14+
rebootWorkerOnCrash: true,
1515
useSmartBalancing: false
1616
});

scworker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var SCWorker = function (options) {
2121
this._errorDomain = domain.create();
2222
this._errorDomain.on('error', function () {
2323
self.errorHandler.apply(self, arguments);
24-
if (self.options.rebootWorkerOnError) {
24+
if (self.options.rebootWorkerOnCrash) {
2525
self.emit(self.EVENT_EXIT);
2626
}
2727
});

test/interaction/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var socketCluster = new SocketCluster({
1111
storeController: __dirname + '/store.js',
1212
addressSocketLimit: 0,
1313
socketEventLimit: 100,
14-
rebootWorkerOnError: true,
14+
rebootWorkerOnCrash: true,
1515
useSmartBalancing: false
1616
});
1717

0 commit comments

Comments
 (0)