aboutsummaryrefslogtreecommitdiff
path: root/modern/src/SocketController.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/SocketController.js')
-rw-r--r--modern/src/SocketController.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js
index cda693a..c100df1 100644
--- a/modern/src/SocketController.js
+++ b/modern/src/SocketController.js
@@ -27,11 +27,13 @@ const SocketController = () => {
const authenticated = useSelector(state => !!state.session.user);
const connectSocket = () => {
+ console.log('connect socket method invoked');
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const socket = new WebSocket(protocol + '//' + window.location.host + '/api/socket');
socket.onclose = () => {
- setTimeout(() => connectSocket(), 60 * 1000);
+ console.log('socket closed');
+ setTimeout(() => {console.log('socket reconnection try');connectSocket()}, 60 * 1000);
};
socket.onmessage = (event) => {