From 206b7ed2f3ad7717f0d84070688ecdb0f9b662ff Mon Sep 17 00:00:00 2001 From: "DESKTOP-DPA61F8\\Benedek" Date: Sun, 25 Apr 2021 19:46:19 +0200 Subject: [PATCH] Client --- client/client.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/client/client.py b/client/client.py index 4f2b1b6..f6ae1a2 100644 --- a/client/client.py +++ b/client/client.py @@ -101,15 +101,11 @@ while True: if separatedCommand[0] == 'LIN' and len(separatedCommand) == 3: network = NetWrapper(CLIENT_PRIVATE_KEY, CLIENT_ADDRESS, separatedCommand[1], SERVER_PUBLIC_KEY) - print('Start') - if not network.identifyServer(): - print('Server identification failed!') + try: + network.connectToServer() + except Exception as e: + print("Error: "+str(e)) continue - print('Identified') - network.createEncryptedChannel() - print('Channel created') - network.authenticate(password=separatedCommand[2]) - print('Authenticated') LOGGED_IN = True continue