From 7b344a41eb64f1c3bdef68e0416f895274d37847 Mon Sep 17 00:00:00 2001 From: none Date: Mon, 26 Feb 2024 21:13:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=BB=D0=B8=D1=88=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=20=D0=B1=D0=BE=D0=BB=D1=8C=D1=88=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5=D1=81=D1=82=D0=B2=D0=B0=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- network.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/network.py b/network.py index 60d24db..6e6b3bc 100644 --- a/network.py +++ b/network.py @@ -135,7 +135,6 @@ def client(port, op = "ping", host = 'jetwork.404.mn'): s.send(op.encode()) - data = Queue() ping = Thread(target = recv, args=(s, data,)) @@ -145,6 +144,9 @@ def client(port, op = "ping", host = 'jetwork.404.mn'): # Ждём 8 секунд ping.join(6) + # Закрываем соединение + s.close() + if not data.empty(): return data.get() else: