kopia lustrzana https://github.com/Aircoookie/WLED
Added WS reconnect on error toast.
rodzic
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
Plik diff jest za duży
Load Diff
Ładowanie…
Reference in New Issue