Skip to content

Commit

Permalink
fix(server): Handle new socket.io internal format.
Browse files Browse the repository at this point in the history
Fixes #1782
  • Loading branch information
dignifiedquire committed Jan 6, 2016
1 parent 8263195 commit 3ab78d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ Server.prototype._start = function (config, launcher, preprocess, fileList, webS
// TODO(vojta): change the client to not send the event (if disconnected by purpose)
var sockets = socketServer.sockets.sockets

sockets.forEach(function (socket) {
Object.keys(sockets).forEach(function (id) {
var socket = sockets[id]
socket.removeAllListeners('disconnect')
if (!socket.disconnected) {
// Disconnect asynchronously. Socket.io mutates the `sockets.sockets` array
Expand Down

2 comments on commit 3ab78d6

@levithomason
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@levithomason
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dignifiedquire I believe this resolves #1751

Please sign in to comment.