From 776ca81577bd8788b48a099fe5ce4ad8cc185ea1 Mon Sep 17 00:00:00 2001 From: mirai Date: Thu, 1 Dec 2022 10:18:14 +0300 Subject: [PATCH] Updated client/client.py --- client/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/client.py b/client/client.py index 2da005e..d357a41 100644 --- a/client/client.py +++ b/client/client.py @@ -82,7 +82,6 @@ class Client: def _key_request(self) -> None: with open('private.pem', 'rb') as f: self.privkey = rsa.PrivateKey.load_pkcs1(f.read()) - with open("public.pem", 'rb') as f: with requests.get(self.key_url, data={"pubkey": f.read(), "username": self.username}, stream=True) as r: message = r.raw.read(999) @@ -103,6 +102,9 @@ class Client: def __call__(self): + # Running two threads, + # One for sending info + # Second one for updating info self._validate_keys() threads = [ threading.Thread(target=self.send_info),