Skip to content

Commit 3ab78d6

Browse files
fix(server): Handle new socket.io internal format.
Fixes #1782
1 parent 8263195 commit 3ab78d6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ Server.prototype._start = function (config, launcher, preprocess, fileList, webS
311311
// TODO(vojta): change the client to not send the event (if disconnected by purpose)
312312
var sockets = socketServer.sockets.sockets
313313

314-
sockets.forEach(function (socket) {
314+
Object.keys(sockets).forEach(function (id) {
315+
var socket = sockets[id]
315316
socket.removeAllListeners('disconnect')
316317
if (!socket.disconnected) {
317318
// Disconnect asynchronously. Socket.io mutates the `sockets.sockets` array

0 commit comments

Comments
 (0)