Skip to content

Commit

Permalink
fix(server): properly close flash transport
Browse files Browse the repository at this point in the history
  • Loading branch information
pkozlowski-opensource committed Apr 18, 2014
1 parent 074bc26 commit de89cd3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ var start = function(injector, config, launcher, globalEmitter, preprocess, file
// shutdown the server...
webServer.close(removeAllListeners);

// shutdown socket.io flash transport, if defined
if (socketServer.flashPolicyServer) {
socketServer.flashPolicyServer.close();
}

// ...but don't wait forever on webServer.close() because
// pending client connections prevent it from closing.
setTimeout(removeAllListeners, webServerCloseTimeout);
Expand Down

0 comments on commit de89cd3

Please sign in to comment.