Skip to content

Commit

Permalink
Merge pull request hummingbot#3059 from CoinAlpha/fix/trading_pair_ti…
Browse files Browse the repository at this point in the history
…meout

[0.37.1] hotfix / added check to replace timeout errors with empty lists
  • Loading branch information
dennisocana authored Mar 10, 2021
2 parents c2f5146 + 11a33e4 commit 8ac5646
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hummingbot/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.37.0
0.37.1
2 changes: 1 addition & 1 deletion hummingbot/client/config/config_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def get_erc20_token_addresses() -> Dict[str, List]:
address_file_path = TOKEN_ADDRESSES_FILE_PATH
token_list = {}

resp = requests.get(token_list_url, timeout=3)
resp = requests.get(token_list_url, timeout=1)
decoded_resp = resp.json()

for token in decoded_resp["tokens"]:
Expand Down
4 changes: 4 additions & 0 deletions hummingbot/core/utils/trading_pair_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@ async def fetch_all(self):

results = await safe_gather(*tasks, return_exceptions=True)
self.trading_pairs = dict(zip(fetched_connectors, results))
# In case trading pair fetching returned timeout, using empty list
for connector, result in self.trading_pairs.items():
if isinstance(result, asyncio.TimeoutError):
self.trading_pairs[connector] = []
self.ready = True

0 comments on commit 8ac5646

Please sign in to comment.