Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Added exception on lost connection for peer info gathering
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrevinnoc committed Mar 12, 2021
1 parent 61b31b0 commit 3c17824
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions future.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,10 +665,13 @@ def _getPeerInfoList():
})
else:
try:
response = requests.get("http://" + peer + "/_getPeerInfo")
try:
response = requests.get("http://" + peer + "/_getPeerInfo")
except:
response = requests.get("https://" + peer + "/_getPeerInfo")
peerInfoList.append(response.json()["result"])
except:
response = requests.get("https://" + peer + "/_getPeerInfo")
peerInfoList.append(response.json()["result"])
pass
return jsonify(result={"listOfPeers": peerInfoList})


Expand Down

0 comments on commit 3c17824

Please sign in to comment.