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
|
return
|
||||||
source, remainder = linesplit
|
source, remainder = linesplit
|
||||||
parser.line_input(remainder)
|
parser.line_input(remainder)
|
||||||
|
except (ConnectionResetError, ConnectionAbortedError, BrokenPipeError):
|
||||||
|
# May happens on Windows when client disconnects
|
||||||
|
pass
|
||||||
finally:
|
finally:
|
||||||
writer.close()
|
writer.close()
|
||||||
|
|
||||||
|
|
|
@ -502,6 +502,9 @@ class Server(_AsyncioServer):
|
||||||
"message": traceback.format_exc()}
|
"message": traceback.format_exc()}
|
||||||
line = pyon.encode(obj) + "\n"
|
line = pyon.encode(obj) + "\n"
|
||||||
writer.write(line.encode())
|
writer.write(line.encode())
|
||||||
|
except (ConnectionResetError, ConnectionAbortedError, BrokenPipeError):
|
||||||
|
# May happens on Windows when client disconnects
|
||||||
|
pass
|
||||||
finally:
|
finally:
|
||||||
writer.close()
|
writer.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue