From ec43d7135f34ae534476471a16103924e2e471a6 Mon Sep 17 00:00:00 2001 From: davidkneipp Date: Thu, 24 Oct 2024 15:44:52 +1000 Subject: [PATCH] Add timeout to requests --- lib/diameter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/diameter.py b/lib/diameter.py index 3c82679..4604b9f 100755 --- a/lib/diameter.py +++ b/lib/diameter.py @@ -3038,7 +3038,7 @@ def Answer_16777236_265(self, packet_vars, avps): for localGeoredEndpoint in localGeoredEndpoints: endpointUrl = f"{localGeoredEndpoint}/pcrf/pcrf_serving_apn_ip/{ueIp}" self.logTool.log(service='HSS', level='debug', message=f"[diameter.py] [Answer_16777236_265] [AAA] Searching remote HSS for serving apn: {endpointUrl}", redisClient=self.redisMessaging) - response = requests.get(url=endpointUrl) + response = requests.get(url=endpointUrl, timeout=1) self.logTool.log(service='HSS', level='debug', message=f"[diameter.py] [Answer_16777236_265] [AAA] Response: {response.text}", redisClient=self.redisMessaging) responseJson = response.json() self.logTool.log(service='HSS', level='debug', message=f"[diameter.py] [Answer_16777236_265] [AAA] Response JSON: {responseJson}", redisClient=self.redisMessaging)