better messahe handling for failed logins
This commit is contained in:
parent
02768a0971
commit
200a4c99b4
@ -66,9 +66,10 @@ class WebsocketConnection
|
|||||||
|
|
||||||
on_close()
|
on_close()
|
||||||
{
|
{
|
||||||
|
var login_failed = !this.registered;
|
||||||
this.registered = false;
|
this.registered = false;
|
||||||
this.connected = false;
|
this.connected = false;
|
||||||
if (!this.closed_by_user)
|
if (!this.closed_by_user && !login_failed)
|
||||||
{
|
{
|
||||||
this.status_label.innerHTML = "connection to server closed";
|
this.status_label.innerHTML = "connection to server closed";
|
||||||
this.error_callback_func();
|
this.error_callback_func();
|
||||||
|
Loading…
Reference in New Issue
Block a user