Bläddra i källkod

修复编译报错

lxylxy123321 2 dagar sedan
förälder
incheckning
8f06983cfe
1 ändrade filer med 0 tillägg och 3 borttagningar
  1. 0 3
      frontend/src/api/websocket.ts

+ 0 - 3
frontend/src/api/websocket.ts

@@ -2,7 +2,6 @@ class WSManager {
   private ws: WebSocket | null = null
   private ws: WebSocket | null = null
   private handlers: Map<string, Set<(msg: Record<string, unknown>) => void>> = new Map()
   private handlers: Map<string, Set<(msg: Record<string, unknown>) => void>> = new Map()
   private reconnectTimer: ReturnType<typeof setTimeout> | null = null
   private reconnectTimer: ReturnType<typeof setTimeout> | null = null
-  private url: string | null = null
 
 
   connect(baseUrl?: string) {
   connect(baseUrl?: string) {
     if (this.ws) return
     if (this.ws) return
@@ -15,8 +14,6 @@ class WSManager {
       wsUrl += wsUrl.includes('?') ? '&' : '?'
       wsUrl += wsUrl.includes('?') ? '&' : '?'
       wsUrl += `token=${encodeURIComponent(token)}`
       wsUrl += `token=${encodeURIComponent(token)}`
     }
     }
-    this.url = wsUrl
-
     try {
     try {
       this.ws = new WebSocket(wsUrl)
       this.ws = new WebSocket(wsUrl)
     } catch {
     } catch {