diff --git a/src/parts/WebSocketServer/WebSocketServer.js b/src/parts/WebSocketServer/WebSocketServer.js index 85a68f0..cfe2c74 100644 --- a/src/parts/WebSocketServer/WebSocketServer.js +++ b/src/parts/WebSocketServer/WebSocketServer.js @@ -21,9 +21,6 @@ export const handleUpgrade = (request, socket) => { throw new TypeError(`socket must be of type Socket`) } const { promise, resolve } = Promises.withResolvers() - const upgradeCallback = (ws) => { - resolve(ws) - } - webSocketServer.handleUpgrade(request, socket, Buffer.alloc(0), upgradeCallback) + webSocketServer.handleUpgrade(request, socket, Buffer.alloc(0), resolve) return promise }