From dc28a1b80355f25fae771d981229cbc2a50ca334 Mon Sep 17 00:00:00 2001 From: ha7ilm Date: Tue, 2 Dec 2014 00:42:32 +0100 Subject: [PATCH] allow only one single client connection --- openwebrx.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openwebrx.py b/openwebrx.py index c5fc42d..efecb10 100755 --- a/openwebrx.py +++ b/openwebrx.py @@ -252,6 +252,10 @@ class WebRXHandler(BaseHTTPRequestHandler): return # ========= Client handshake ========= + if myclient.ws_started: + print "[openwebrx-httpd] error: second client ws connection, throwing it." + self.send_error(400, 'Bad request.') #client already started + return rxws.send(self, "CLIENT DE SERVER openwebrx.py") client_ans=rxws.recv(self, True) if client_ans[:16]!="SERVER DE CLIENT":