From d4769934096388deca002f54280bf97708be5e71 Mon Sep 17 00:00:00 2001 From: Tommaso Tedeschi Date: Thu, 11 Jul 2024 15:43:37 +0200 Subject: [PATCH] Better handle "ping" vk request --- handles.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/handles.py b/handles.py index 94a5cf1..1d728f0 100644 --- a/handles.py +++ b/handles.py @@ -599,7 +599,10 @@ def StatusHandler(): if len(req_list) == 0: logging.error("Invalid request data") logging.error(f"STATUS REQUEST DATA IS THE FOLLOWING: {req_list}") - return "Invalid request data for getting status", 400 + if os.path.isfile(args.proxy): + return "This is a ping request.. I'm alive!", 200 + else: + return "This is a ping request.. I'm not alive yet, no proxyfile available!", 400 req = req_list[0]