Skip to content

Commit 04babf4

Browse files
authored
Merge pull request #468 from microsoft/macae-v3-fr-dev-92
Update WebSocketService.tsx
2 parents f2de165 + 1a07518 commit 04babf4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/frontend/src/services/WebSocketService.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ class WebSocketService {
1212
private planSubscriptions: Set<string> = new Set();
1313
private reconnectTimer: NodeJS.Timeout | null = null;
1414
private isConnecting = false;
15-
private baseWsUrl = getApiUrl() || 'ws://localhost:8000';
15+
1616

1717
private buildSocketUrl(processId?: string, sessionId?: string): string {
18+
const baseWsUrl = getApiUrl() || 'ws://localhost:8000';
1819
// Trim and remove trailing slashes
19-
let base = (this.baseWsUrl || '').trim().replace(/\/+$/, '');
20+
let base = (baseWsUrl || '').trim().replace(/\/+$/, '');
2021
// Normalize protocol: http -> ws, https -> wss
2122
base = base.replace(/^http:\/\//i, 'ws://')
2223
.replace(/^https:\/\//i, 'wss://');

0 commit comments

Comments
 (0)