mirror of
https://github.com/romanz/amodem.git
synced 2026-04-21 22:06:27 +08:00
HACK: better line iteration
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user