aboutsummaryrefslogtreecommitdiff
path: root/modern/src/SocketController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-27 16:40:29 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-27 16:40:29 -0700
commite738ba5e5bfc8de1b1190a4d7302fe99bbb97103 (patch)
tree019cc71b735904c0e9b202f8e9aff131f1c9055a /modern/src/SocketController.js
parent2d371784bd8a1fbefa0b489c3a4a2a1c04eaf7c9 (diff)
downloadtrackermap-web-e738ba5e5bfc8de1b1190a4d7302fe99bbb97103.tar.gz
trackermap-web-e738ba5e5bfc8de1b1190a4d7302fe99bbb97103.tar.bz2
trackermap-web-e738ba5e5bfc8de1b1190a4d7302fe99bbb97103.zip
Fix websocket issue
Diffstat (limited to 'modern/src/SocketController.js')
-rw-r--r--modern/src/SocketController.js2
1 files changed, 1 insertions, 1 deletions
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) {