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:
parent
0c62ce4cf0
commit
4223241ac9
1 changed files with 3 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue