From 2f0cc0fde492a02523cc01e978722004862eac39 Mon Sep 17 00:00:00 2001 From: Marvin Heilemann Date: Tue, 15 Dec 2020 09:34:26 +0100 Subject: [PATCH] fix: socket-io deprecated default export --- lib/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server.js b/lib/server.js index fb07b77b9..d75c58a84 100644 --- a/lib/server.js +++ b/lib/server.js @@ -36,13 +36,13 @@ const EmitterWrapper = require('./emitter_wrapper') const processWrapper = new EmitterWrapper(process) function createSocketIoServer (webServer, executor, config) { - const server = new SocketIO(webServer, { + const server = new SocketIO.Server(webServer, { // avoid destroying http upgrades from socket.io to get proxied websockets working destroyUpgrade: false, path: config.urlRoot + 'socket.io/', transports: config.transports, forceJSONP: config.forceJSONP, - // Default is 5000 in socket.io v2.x. + // Default is 5000 in socket.io v2.x and v3.x. pingTimeout: config.pingTimeout || 5000 })