From e738ba5e5bfc8de1b1190a4d7302fe99bbb97103 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 27 May 2022 16:40:29 -0700 Subject: Fix websocket issue --- modern/src/SocketController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modern/src') diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js index a6f1fa11..d9221897 100644 --- a/modern/src/SocketController.js +++ b/modern/src/SocketController.js @@ -37,7 +37,7 @@ const SocketController = () => { dispatch(sessionActions.updateSocket(true)); }; - socket.onclose = async () => { + socket.onerror = async () => { dispatch(sessionActions.updateSocket(false)); const devicesResponse = await fetch('/api/devices'); if (devicesResponse.ok) { -- cgit v1.2.3