better messahe handling for failed logins

This commit is contained in:
Jonas Weinz 2019-03-21 20:12:39 +01:00
parent 02768a0971
commit 200a4c99b4

View File

@ -66,9 +66,10 @@ class WebsocketConnection
on_close()
{
var login_failed = !this.registered;
this.registered = 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.error_callback_func();