update
Deploy / deploy (push) Has been cancelled

This commit is contained in:
xuyue committed 2025-10-07 21:26:54 +08:00
1 parent 389393b70d
commit 7938e02421
7 files changed
+14 -15

No files matched your search

+1 -3
View File
@@ -62,9 +62,7 @@ export class BaseWebSocket<T extends WebSocketMessage = WebSocketMessage> {
public status: Ref<ConnectionStatus> = ref<ConnectionStatus>("disconnected")
constructor(config: WebSocketConfig) {
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:"
const host = window.location.host
this.url = `${protocol}//${host}/ws/${config.path}/`
this.url = import.meta.env.PUBLIC_WS_URL
this.maxReconnectAttempts = config.maxReconnectAttempts ?? 5
this.reconnectDelay = config.reconnectDelay ?? 1000