aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.js
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2018-05-22 21:59:37 -0500
committeroldmud0 <oldmud0@users.noreply.github.com>2018-05-22 21:59:37 -0500
commit78f8f96b97dffae06bdde1c52bd2d2942a622aa9 (patch)
tree0239738fbed13b4f68a1adc3f2c6dccb937c96ef /webAO/client.js
parent5973dd424852bd9db5c3612bb98070bc4ab00688 (diff)
Log console on network close events
Diffstat (limited to 'webAO/client.js')
-rw-r--r--webAO/client.js2
1 files changed, 2 insertions, 0 deletions
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();
}