diff options
author | Anton Tananaev <anton@traccar.org> | 2022-09-04 13:49:11 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-09-04 13:49:11 -0700 |
commit | 47ffffb6f90bfd9a8aaae1fd696d588c175c94a6 (patch) | |
tree | c7b9efcd93b3be36e2fba067301bcae7ff465525 | |
parent | 8dbfbcd6a5b7c9356c335debec28e70cd3952cb2 (diff) | |
download | trackermap-web-47ffffb6f90bfd9a8aaae1fd696d588c175c94a6.tar.gz trackermap-web-47ffffb6f90bfd9a8aaae1fd696d588c175c94a6.tar.bz2 trackermap-web-47ffffb6f90bfd9a8aaae1fd696d588c175c94a6.zip |
Fix socket reconnect issue
-rw-r--r-- | modern/src/SocketController.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js index baecbfce..c986e363 100644 --- a/modern/src/SocketController.js +++ b/modern/src/SocketController.js @@ -40,7 +40,7 @@ const SocketController = () => { dispatch(sessionActions.updateSocket(true)); }; - socket.onerror = async () => { + socket.onclose = async () => { dispatch(sessionActions.updateSocket(false)); const devicesResponse = await fetch('/api/devices'); if (devicesResponse.ok) { |