Skip to content

Commit

Permalink
v6.7.1 - Don't always reboot worker if broker crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
jondubois committed Aug 7, 2017
1 parent ea19ad3 commit bdc8c86
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ SocketCluster.prototype._init = function (options) {
tcpSynBacklog: null,
workerController: null,
brokerController: null,
brokerConnectRetryErrorThreshold: null,
initController: null,
rebootOnSignal: true,
downgradeToUser: false,
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/socketcluster-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
spec:
containers:
- name: socketcluster
image: socketcluster/socketcluster:v6.7.0
image: socketcluster/socketcluster:v6.7.1
ports:
- containerPort: 8000
env:
Expand Down
7 changes: 4 additions & 3 deletions lib/scworker.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ SCWorker.prototype._init = function (options) {
this.brokerEngineClient = new this.brokerEngine.Client({
brokers: this.options.brokers,
secretKey: this.options.secretKey,
pubSubBatchDuration: this.options.pubSubBatchDuration
pubSubBatchDuration: this.options.pubSubBatchDuration,
connectRetryErrorThreshold: this.options.brokerConnectRetryErrorThreshold
});

this.brokerEngineClient.on('error', function (err) {
Expand All @@ -107,8 +108,8 @@ SCWorker.prototype._init = function (options) {
}
self._errorDomain.emit('error', error);
});
this.brokerEngineClient.on('warning', function () {
self.warningHandler.apply(self, arguments);
this.brokerEngineClient.on('warning', function (warning) {
self.warningHandler(warning);
});
this.exchange = this.global = this.brokerEngineClient.exchange();

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "socketcluster",
"description": "SocketCluster - A Highly parallelized WebSocket server cluster to make the most of multi-core machines/instances.",
"version": "6.7.0",
"version": "6.7.1",
"homepage": "http://socketcluster.io",
"contributors": [
{
Expand All @@ -20,7 +20,7 @@
"inquirer": "1.1.3",
"minimist": "1.1.0",
"sc-auth": "~4.1.1",
"sc-broker-cluster": "~4.2.0",
"sc-broker-cluster": "~4.2.2",
"sc-domain": "~1.0.1",
"sc-emitter": "~1.1.0",
"sc-errors": "~1.3.3",
Expand Down
2 changes: 1 addition & 1 deletion sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"sc-hot-reboot": "~1.0.0",
"scc-broker-client": "~1.4.0",
"serve-static": "1.11.2",
"socketcluster": "~6.7.0",
"socketcluster": "~6.7.1",
"socketcluster-client": "~6.3.0"
},
"keywords": [
Expand Down

0 comments on commit bdc8c86

Please sign in to comment.