mirror of
https://github.com/Justuser3310/jetwork.git
synced 2025-01-18 17:08:48 +00:00
Исправление слишком большого количества подключений
This commit is contained in:
parent
bef2644127
commit
7b344a41eb
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user