From ba9a9096bfd818bb577e5707189c79a7d7aca688 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Fri, 10 Jan 2020 21:43:21 +0100 Subject: [PATCH] use the nice error overlay, closes #28 --- htdocs/openwebrx.js | 3 +++ owrx/connection.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index 8a985aa..a7518cb 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -1148,6 +1148,9 @@ function on_ws_recv(evt) { break; case 'backoff': divlog("Server is currently busy: " + json['reason'], true); + var $overlay = $('#openwebrx-error-overlay'); + $overlay.find('.errormessage').text(json['reason']); + $overlay.show(); // set a higher reconnection timeout right away to avoid additional load reconnect_timeout = 16000; break; diff --git a/owrx/connection.py b/owrx/connection.py index 295d3a4..7aa6fc6 100644 --- a/owrx/connection.py +++ b/owrx/connection.py @@ -89,7 +89,7 @@ class OpenWebRxReceiverClient(Client): try: ClientRegistry.getSharedInstance().addClient(self) except TooManyClientsException: - self.write_backoff_message("too many clients") + self.write_backoff_message("Too many clients") self.close() raise