From 78f8f96b97dffae06bdde1c52bd2d2942a622aa9 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Tue, 22 May 2018 21:59:37 -0500 Subject: Log console on network close events --- webAO/client.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'webAO') diff --git a/webAO/client.js b/webAO/client.js index eca41da..44a130c 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -186,6 +186,7 @@ class Client { * @param {CloseEvent} e */ onClose(e) { + console.error(`The connection was closed: ${e.reason} (${e.code})`); document.getElementById("client_error").style.display = "block"; this.cleanup(); } @@ -213,6 +214,7 @@ class Client { * @param {ErrorEvent} e */ onError(e) { + console.error(`A network error occurred: ${e.reason} (${e.code})`); document.getElementById("client_error").style.display = "block"; this.cleanup(); } -- cgit