catch KeyboardInterrupt
This commit is contained in:
@ -16,7 +16,6 @@ try:
|
||||
while True:
|
||||
m = socket.recv_string()
|
||||
DATETIMES.append(datetime.now())
|
||||
except Exception as e:
|
||||
print(e)
|
||||
except KeyboardInterrupt:
|
||||
socket.close()
|
||||
print(DATETIMES)
|
@ -14,5 +14,5 @@ msg_body = "a" * n
|
||||
try:
|
||||
while True:
|
||||
socket.send_string(f"test {msg_body}")
|
||||
except Exception:
|
||||
except KeyboardInterrupt:
|
||||
socket.close()
|
Reference in New Issue
Block a user