allow only one single client connection

This commit is contained in:
ha7ilm 2014-12-02 00:42:32 +01:00
parent 5d38c21039
commit dc28a1b803
1 changed files with 4 additions and 0 deletions

View File

@ -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":