diff --git a/client.py b/client.py index e28aefe..9d6a276 100644 --- a/client.py +++ b/client.py @@ -56,9 +56,9 @@ if __name__ == "__main__": read_msg(s) except ConnectionRefusedError: print("Could not connect to the server!") + finally: + s.close() except KeyboardInterrupt: print("Exit with CTRL+C") - finally: - pass