|
|
@ -27,11 +27,12 @@ while True:
|
|
|
|
for sock in readable:
|
|
|
|
for sock in readable:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
data = sock.recv(1024)
|
|
|
|
data = sock.recv(1024)
|
|
|
|
|
|
|
|
cur_client = client_map[sock.fileno()]
|
|
|
|
|
|
|
|
|
|
|
|
if data:
|
|
|
|
if data:
|
|
|
|
cur_client = client_map[sock.fileno()]
|
|
|
|
|
|
|
|
cur_client.process_data(data)
|
|
|
|
cur_client.process_data(data)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|
|
|
|
cur_client.end()
|
|
|
|
select_inputs = remove_from_list(select_inputs, sock)
|
|
|
|
select_inputs = remove_from_list(select_inputs, sock)
|
|
|
|
print "NOTICE: Client disconnected"
|
|
|
|
print "NOTICE: Client disconnected"
|
|
|
|
except ssl.SSLError, err:
|
|
|
|
except ssl.SSLError, err:
|
|
|
|