mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Fixing stupid error, and introducing a sleep, to see if the
other thread is awakened and finish sending data.
This commit is contained in:
parent
b4dfafaba6
commit
e312416809
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue