Adjust Connection Status panel, stop updating when the connection is closed

This commit is contained in:
NI
2019-10-01 15:45:28 +08:00
parent b50946d8cd
commit 5e32228960
3 changed files with 31 additions and 11 deletions

View File

@@ -153,7 +153,9 @@ class Dial {
ws.addEventListener("error", event => {
event.toString = () => {
return "WebSocket Error (" + event.code + ")";
return (
"WebSocket Error (" + (event.code ? event.code : "Unknown") + ")"
);
};
rd.closeWithReason(event);