Skip to content

Commit

Permalink
add timeout to lg requests to handle unresponsive routers
Browse files Browse the repository at this point in the history
  • Loading branch information
Laur04 committed Nov 5, 2022
1 parent 0775d5e commit 1637bde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/alto/agent/geantlg.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _do_query(self, router=None, args=None):
headers={
'Content-Type': 'application/json'
},
proxies=self.proxies)
proxies=self.proxies, timeout=5)
doctree = data.json()['output'][router]['commandResult']
query_result = json.loads(json.dumps(xmltodict.parse(doctree)))
for table in query_result["rpc-reply"]["route-information"]["route-table"]:
Expand Down

0 comments on commit 1637bde

Please sign in to comment.