We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8916c01 commit 3b46db6Copy full SHA for 3b46db6
apps/webapp/app/v3/handleWebsockets.server.ts
@@ -7,10 +7,12 @@ import { AuthenticatedSocketConnection } from "./authenticatedSocketConnection.s
7
import { Gauge } from "prom-client";
8
import { metricsRegister } from "~/metrics.server";
9
10
-export const wss = singleton("wss", initalizeWebSocketServer);
11
-
+// Moved in front of export const wss because
+// ReferenceError: Cannot access 'authenticatedConnections' before initialization
12
let authenticatedConnections: Map<string, AuthenticatedSocketConnection>;
13
14
+export const wss = singleton("wss", initalizeWebSocketServer);
15
+
16
function initalizeWebSocketServer() {
17
const server = new WebSocketServer({ noServer: true });
18
0 commit comments