forked from M-Labs/artiq
protocols/logging,pc_rpc: do not print errors on Windows when clients disconnect
This commit is contained in:
parent
7aaeb636e4
commit
27c12a5bf4
@ -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()
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user