allow only one single client connection

This commit is contained in:
ha7ilm 2014-12-02 00:42:32 +01:00
parent 5d38c21039
commit dc28a1b803

View File

@ -252,6 +252,10 @@ class WebRXHandler(BaseHTTPRequestHandler):
return return
# ========= Client handshake ========= # ========= 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") rxws.send(self, "CLIENT DE SERVER openwebrx.py")
client_ans=rxws.recv(self, True) client_ans=rxws.recv(self, True)
if client_ans[:16]!="SERVER DE CLIENT": if client_ans[:16]!="SERVER DE CLIENT":