1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

web: fix automatic reconnect

This commit is contained in:
Steffen Vogel 2018-09-17 22:17:52 +02:00
parent 0c62ce4cf0
commit 4223241ac9

View file

@ -260,12 +260,9 @@ function wsConnect(node)
.text('Disconnected' + (error.reason != '' ? ' (' + error.reason + ')' : ''))
.css('color', 'red');
/* Try connect if close reason was CLOSE_NORMAL */
if (error.code == 1000 || error.code == 1001) {
setTimeout(function() {
wsConnect(currentNode);
}, 1000);
}
setTimeout(function() {
wsConnect(currentNode);
}, 1000);
};
conn.onerror = function(error) {