Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better DC logic on shutdown

  • Loading branch information...
commit 815d15299c1f8362e7740efbfbf2c3f86a1863b9 1 parent 93a09b2
Evan Tahler authored
1  actionHero.js
View
@@ -141,6 +141,7 @@ actionHero.prototype.stop = function(next){
var orderedTeardowns = {};
var thing = [
"webServer",
+ "faye",
"webSocketServer",
"socketServer",
"taskProcessor"
5 initializers/faye.js
View
@@ -40,6 +40,11 @@ var faye = function(api, next){
next();
}
+ api.faye._teardown = function(api, next){
+ api.faye.server.getClient().disconnect();
+ next();
+ }
+
api.faye.connectHandlers.push(function(clientId){
api.log("faye client connected: " + clientId, "debug");
});
5 initializers/webServer.js
View
@@ -46,9 +46,8 @@ var webServer = function(api, next){
}
}
}
- if(api.configData.webSockets.enable != true){
- api.webServer.server.close();
- }
+
+ api.webServer.server.close();
next();
}
Please sign in to comment.
Something went wrong with that request. Please try again.