aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-09-04 13:49:11 -0700
committerAnton Tananaev <anton@traccar.org>2022-09-04 13:49:11 -0700
commit47ffffb6f90bfd9a8aaae1fd696d588c175c94a6 (patch)
treec7b9efcd93b3be36e2fba067301bcae7ff465525
parent8dbfbcd6a5b7c9356c335debec28e70cd3952cb2 (diff)
downloadtrackermap-web-47ffffb6f90bfd9a8aaae1fd696d588c175c94a6.tar.gz
trackermap-web-47ffffb6f90bfd9a8aaae1fd696d588c175c94a6.tar.bz2
trackermap-web-47ffffb6f90bfd9a8aaae1fd696d588c175c94a6.zip
Fix socket reconnect issue
-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 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) {