Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

better DC logic on shutdown

  • Loading branch information...
commit 815d15299c1f8362e7740efbfbf2c3f86a1863b9 1 parent 93a09b2
Evan Tahler authored
1  actionHero.js
@@ -141,6 +141,7 @@ actionHero.prototype.stop = function(next){
141 141 var orderedTeardowns = {};
142 142 var thing = [
143 143 "webServer",
  144 + "faye",
144 145 "webSocketServer",
145 146 "socketServer",
146 147 "taskProcessor"
5 initializers/faye.js
@@ -40,6 +40,11 @@ var faye = function(api, next){
40 40 next();
41 41 }
42 42
  43 + api.faye._teardown = function(api, next){
  44 + api.faye.server.getClient().disconnect();
  45 + next();
  46 + }
  47 +
43 48 api.faye.connectHandlers.push(function(clientId){
44 49 api.log("faye client connected: " + clientId, "debug");
45 50 });
5 initializers/webServer.js
@@ -46,9 +46,8 @@ var webServer = function(api, next){
46 46 }
47 47 }
48 48 }
49   - if(api.configData.webSockets.enable != true){
50   - api.webServer.server.close();
51   - }
  49 +
  50 + api.webServer.server.close();
52 51 next();
53 52 }
54 53

0 comments on commit 815d152

Please sign in to comment.
Something went wrong with that request. Please try again.