summary refs log tree commit diff
path: root/webrtc/src/Server.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-16 13:51:32 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-16 13:51:32 +1000
commit3866c7a2a3848a13fc238298a22b2109ee9febb6 (patch)
tree57673e02c247ad0dae49a5628623880900bcfa4d /webrtc/src/Server.ts
parentAdd webrtc to bundle (diff)
downloadserver-3866c7a2a3848a13fc238298a22b2109ee9febb6.tar.xz
hmm
Diffstat (limited to 'webrtc/src/Server.ts')
-rw-r--r--webrtc/src/Server.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/webrtc/src/Server.ts b/webrtc/src/Server.ts
index e2fa8634..32b795ea 100644
--- a/webrtc/src/Server.ts
+++ b/webrtc/src/Server.ts
@@ -22,18 +22,18 @@ export class Server {
 			});
 		}
 
-		this.server.on("upgrade", (request, socket, head) => {
-			if (!request.url?.includes("voice")) return;
-			this.ws.handleUpgrade(request, socket, head, (socket) => {
-				// @ts-ignore
-				socket.server = this;
-				this.ws.emit("connection", socket, request);
-			});
-		});
+		// this.server.on("upgrade", (request, socket, head) => {
+		// 	if (!request.url?.includes("voice")) return;
+		// 	this.ws.handleUpgrade(request, socket, head, (socket) => {
+		// 		// @ts-ignore
+		// 		socket.server = this;
+		// 		this.ws.emit("connection", socket, request);
+		// 	});
+		// });
 
 		this.ws = new ws.Server({
 			maxPayload: 1024 * 1024 * 100,
-			noServer: true
+			server: this.server,
 		});
 		this.ws.on("connection", Connection);
 		this.ws.on("error", console.error);