diff --git a/index.html b/index.html index c9ac5d2..bda4b63 100644 --- a/index.html +++ b/index.html @@ -13,6 +13,9 @@
Connection +
+ Oh no! We cannot connect! +
diff --git a/js/websockets.js b/js/websockets.js index 633cd78..91e4ba4 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -330,6 +330,9 @@ weechat.factory('connection', ['$rootScope', '$log', 'handlers', 'colors', funct } websocket.onerror = function (evt) { + if (evt.type == "error" && websocket.readyState == 0) { + $rootScope.errorMessage = true; + } $log.error("Relay error " + evt.data); }