From 88853f57df78b67d7ad06906f410520912485fa2 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Fri, 13 Aug 2021 20:54:03 +0200 Subject: :bug: fix bundle gateway listen --- gateway/src/Server.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gateway') diff --git a/gateway/src/Server.ts b/gateway/src/Server.ts index 482545f1..c2bc9c47 100644 --- a/gateway/src/Server.ts +++ b/gateway/src/Server.ts @@ -22,9 +22,15 @@ export class Server { res.writeHead(200).end("Online"); }); + this.server.on("upgrade", (request, socket, head) => { + this.ws.handleUpgrade(request, socket, head, (socket) => { + this.ws.emit("connection", socket, request); + }); + }); + this.ws = new WebSocketServer({ maxPayload: 4096, - server: this.server, + noServer: true, }); this.ws.on("connection", Connection); this.ws.on("error", console.error); -- cgit 1.4.1