From 0eabc8984046df2fac1777776ccd782332fea873 Mon Sep 17 00:00:00 2001 From: rahthakor Date: Thu, 15 Jan 2026 01:38:30 +0530 Subject: [PATCH] fix(ui): use application-defined WebSocket close code --- ui/src/ui/gateway.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/ui/gateway.ts b/ui/src/ui/gateway.ts index 31d4bb6b5..9ce46c326 100644 --- a/ui/src/ui/gateway.ts +++ b/ui/src/ui/gateway.ts @@ -134,7 +134,8 @@ export class GatewayBrowserClient { this.opts.onHello?.(hello); }) .catch(() => { - this.ws?.close(1008, "connect failed"); + // 4008 = application-defined code (browser rejects 1008 "Policy Violation") + this.ws?.close(4008, "connect failed"); }); }