We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84ece70 commit 8fb9ebdCopy full SHA for 8fb9ebd
1 file changed
src/frontend/src/services/WebSocketService.tsx
@@ -12,11 +12,12 @@ class WebSocketService {
12
private planSubscriptions: Set<string> = new Set();
13
private reconnectTimer: NodeJS.Timeout | null = null;
14
private isConnecting = false;
15
- private baseWsUrl = getApiUrl() || 'ws://localhost:8000';
+
16
17
private buildSocketUrl(processId?: string, sessionId?: string): string {
18
+ const baseWsUrl = getApiUrl() || 'ws://localhost:8000';
19
// Trim and remove trailing slashes
- let base = (this.baseWsUrl || '').trim().replace(/\/+$/, '');
20
+ let base = (baseWsUrl || '').trim().replace(/\/+$/, '');
21
// Normalize protocol: http -> ws, https -> wss
22
base = base.replace(/^http:\/\//i, 'ws://')
23
.replace(/^https:\/\//i, 'wss://');
0 commit comments