Webchat: clean server build and add ws types
This commit is contained in:
1 parent
7144a0fb9b
commit
a34ab1d36e
2 files changed
+2
-2
No files matched your search
@@ -405,7 +405,7 @@ export async function startWebChatServer(port = WEBCHAT_DEFAULT_PORT) {
|
||||
return;
|
||||
}
|
||||
const sessionKey = url.searchParams.get("session") ?? "main";
|
||||
wss!.handleUpgrade(req, socket, head, (ws) => {
|
||||
wss!.handleUpgrade(req, socket, head, (ws: WebSocket) => {
|
||||
ws.on("close", () => {
|
||||
const set = wsSessions.get(sessionKey);
|
||||
if (set) {
|
||||
@@ -485,4 +485,3 @@ export async function ensureWebChatServerFromConfig() {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
*** End
|
||||
Reference in new issue
Block a user