Commit e3124168 authored by Facundo Batista's avatar Facundo Batista

Fixing stupid error, and introducing a sleep, to see if the

other thread is awakened and finish sending data.
parent b4dfafab
...@@ -556,9 +556,9 @@ def server(evt): ...@@ -556,9 +556,9 @@ def server(evt):
conn.send("1 Hola mundo\n") conn.send("1 Hola mundo\n")
cantdata = 0 cantdata = 0
while cantdata < 13: while cantdata < 13:
print "len:", cantdata
data = conn.recv(13-cantdata) data = conn.recv(13-cantdata)
cantdata += len(data) cantdata += len(data)
time.sleep(.3)
conn.send("2 No more lines\n") conn.send("2 No more lines\n")
conn.close() conn.close()
except socket.timeout: except socket.timeout:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment