Skip to content
Snippets Groups Projects
PL1
Commit 3f251efb authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

esp8266/modules/webrepl: Enforce only one concurrent WebREPL connection.

Concurrent WebREPL connections were never supported, now actually check
for this.
parent 84679e0c
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,10 @@ def setup_conn(port, accept_handler):
def accept_conn(listen_sock):
global client_s
cl, remote_addr = listen_sock.accept()
if uos.dupterm():
print("\nConcurrent WebREPL connection from", remote_addr, "rejected")
cl.close()
return
print("\nWebREPL connection from:", remote_addr)
client_s = cl
websocket_helper.server_handshake(cl)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment