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

other thread is awakened and finish sending data.
This commit is contained in:
Facundo Batista 2007-05-25 03:47:19 +00:00
parent b4dfafaba6
commit e312416809

View file

@ -556,9 +556,9 @@ def server(evt):
conn.send("1 Hola mundo\n")
cantdata = 0
while cantdata < 13:
print "len:", cantdata
data = conn.recv(13-cantdata)
cantdata += len(data)
time.sleep(.3)
conn.send("2 No more lines\n")
conn.close()
except socket.timeout: