Connection reset handling.
This commit is contained in:
parent
108e417b94
commit
39628177e8
3
slave.py
3
slave.py
@ -95,6 +95,9 @@ while True:
|
|||||||
except BrokenPipeError:
|
except BrokenPipeError:
|
||||||
eprint("connection from {} has broken a pipe.".format(client_address))
|
eprint("connection from {} has broken a pipe.".format(client_address))
|
||||||
conn.close()
|
conn.close()
|
||||||
|
except ConnectionResetError:
|
||||||
|
eprint("connection from {} reset.".format(client_address))
|
||||||
|
conn.close()
|
||||||
finally:
|
finally:
|
||||||
# Clean up the connection
|
# Clean up the connection
|
||||||
conn.close()
|
conn.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user