Added WS reconnect on error toast.
This commit is contained in:
parent
3be4b69b44
commit
7f92607b85
@ -280,6 +280,12 @@ function showToast(text, error = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showErrorToast() {
|
function showErrorToast() {
|
||||||
|
if (ws && ws.readyState === WebSocket.OPEN) {
|
||||||
|
// if we received a timeout force WS reconnect
|
||||||
|
ws.close();
|
||||||
|
ws = null;
|
||||||
|
if (lastinfo.ws > -1) setTimeout(makeWS,500);
|
||||||
|
}
|
||||||
showToast('Connection to light failed!', true);
|
showToast('Connection to light failed!', true);
|
||||||
}
|
}
|
||||||
function clearErrorToast() {
|
function clearErrorToast() {
|
||||||
|
1625
wled00/html_ui.h
1625
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user