From 0b5bf25efb9e2d0f2ce3d035b5f05ab9d66d83c7 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 17 May 2025 19:38:48 -0400 Subject: [PATCH] fix: prompt user before reloading on socket closure --- src/front/utilities/socket/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/front/utilities/socket/index.ts b/src/front/utilities/socket/index.ts index b95e248..9075c5c 100644 --- a/src/front/utilities/socket/index.ts +++ b/src/front/utilities/socket/index.ts @@ -34,7 +34,10 @@ class Socket extends EventTarget { }; this._socket.onclose = () => { - location.reload(); + const willRefresh = confirm("Realtime Data Connection closed\nWould you like to reconnect?"); + if (willRefresh) { + location.reload(); + } }; setInterval(() => {