rate configurator/ purchase of conditions/ fixed payments/ refactoring/ major improvements and fixes

This commit is contained in:
Vladless
2025-11-29 19:08:01 +03:00
parent 17547cd323
commit 22a0eced2b
90 changed files with 5888 additions and 799 deletions
+1 -2
View File
@@ -23,10 +23,9 @@ PING_SEMAPHORE = asyncio.Semaphore(3)
async def ping_server(server_ip: str) -> bool:
"""Пингует сервер через ICMP или TCP 443, если ICMP недоступен."""
async with PING_SEMAPHORE:
try:
response = ping(server_ip, timeout=3)
response = await asyncio.to_thread(ping, server_ip, timeout=3)
if response is not None and response is not False:
return True
return await check_tcp_connection(server_ip, 443)