Skip to content

Commit

Permalink
Add timeout to requests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkneipp committed Oct 24, 2024
1 parent 9d4ee9c commit ec43d71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/diameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ec43d71

Please sign in to comment.