diff --git a/tradebot.facti13.external.py b/tradebot.facti13.external.py index 853dcba..c95409c 100644 --- a/tradebot.facti13.external.py +++ b/tradebot.facti13.external.py @@ -104,11 +104,17 @@ class SteamClient(SteamPy.Client): else: self.alive_checker_is_runned = True + def grabLatency(): + try: + return self.latency + except: + return 0.0 + url = os.getenv("ALIVE_PUSH") while url: try: async with aiohttp.ClientSession() as session: - async with session.get(os.getenv("ALIVE_PUSH") + f'${self.latency}', ssl = False) as response: + async with session.get(os.getenv("ALIVE_PUSH") + f'${grabLatency()}', ssl = False) as response: tmp = await response.text() except: traceback.print_exc()