HACK: better line iteration

This commit is contained in:
Roman Zeyde
2016-06-02 21:39:14 +03:00
parent f89c5bb125
commit 39cb5565bf
2 changed files with 12 additions and 7 deletions

View File

@@ -42,7 +42,8 @@ def recvline(sock):
while True:
c = sock.recv(1)
if not c:
raise EOFError
return None # socket is closed
if c == b'\n':
break
reply.write(c)