2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

protocols/logging,pc_rpc: do not print errors on Windows when clients disconnect

This commit is contained in:
Sebastien Bourdeauducq 2016-01-27 21:23:22 +01:00
parent 7aaeb636e4
commit 27c12a5bf4
2 changed files with 6 additions and 0 deletions

View File

@ -125,6 +125,9 @@ class Server(AsyncioServer):
return
source, remainder = linesplit
parser.line_input(remainder)
except (ConnectionResetError, ConnectionAbortedError, BrokenPipeError):
# May happens on Windows when client disconnects
pass
finally:
writer.close()

View File

@ -502,6 +502,9 @@ class Server(_AsyncioServer):
"message": traceback.format_exc()}
line = pyon.encode(obj) + "\n"
writer.write(line.encode())
except (ConnectionResetError, ConnectionAbortedError, BrokenPipeError):
# May happens on Windows when client disconnects
pass
finally:
writer.close()