From b70c214584109d102848f2c8ee5ddc1e1cbefdb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 25 Apr 2021 18:25:27 +0200 Subject: [PATCH] fix cascading memes --- server/netwrapper.py | 1 + server/server.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/server/netwrapper.py b/server/netwrapper.py index 4eca973..11aa462 100644 --- a/server/netwrapper.py +++ b/server/netwrapper.py @@ -140,3 +140,4 @@ class NetWrapper: return plaintext except Exception: print("Incorrect decryption") + return "ERROR".encode('UTF-8') diff --git a/server/server.py b/server/server.py index 812aab1..29717f1 100644 --- a/server/server.py +++ b/server/server.py @@ -40,6 +40,8 @@ class Server: self.networkInstance.sendMessage("LINOK".encode('UTF-8')) elif command == "LINERROR": self.networkInstance.sendMessage("LINERROR".encode('UTF-8')) + elif command == "ERROR": + return None parsedCommand = command.split(" ") if len(parsedCommand) > 3: self.networkInstance.sendMessage("ERROR".encode('UTF-8'))