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:
|
||||
eprint("connection from {} has broken a pipe.".format(client_address))
|
||||
conn.close()
|
||||
except ConnectionResetError:
|
||||
eprint("connection from {} reset.".format(client_address))
|
||||
conn.close()
|
||||
finally:
|
||||
# Clean up the connection
|
||||
conn.close()
|
||||
|
Loading…
Reference in New Issue
Block a user