diff --git a/list.py b/list.py index a2628e1..9d28829 100644 --- a/list.py +++ b/list.py @@ -126,8 +126,13 @@ def client(): client_socket.close() if mode == 0: - print('To start own server change python file.\n') - client() + print('To start own server change python file.\n') + client() else: - server() - + while True: + try: + server() + except KeyboardInterrupt: + exit() + except: + pass