mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 04:32:35 +01:00
🐛 fix bundle gateway listen
This commit is contained in:
parent
213b5811c4
commit
a772b32f6b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user