aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/SocketController.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js
index 7718db8..07faae0 100644
--- a/modern/src/SocketController.js
+++ b/modern/src/SocketController.js
@@ -53,6 +53,13 @@ const SocketController = () => {
displayNotifications(data.events, t);
}
};
+
+ socket.onclose = () => {
+ console.log ('Socket is closed, reconnecting…');
+ setTimeout(() => {
+ connectSocket();
+ }, 1000);
+ };
};
useEffectAsync(async () => {