Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions python/ccxt/async_support/base/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,8 @@ async def load_markets(self, reload=False, params={}):
"""
if (reload and not self.reloading_markets) or not self.markets_loading:
self.reloading_markets = True
coroutine = self.load_markets_helper(reload, params)
# coroutines can only be awaited once so we wrap it in a task
self.markets_loading = asyncio.ensure_future(coroutine)
self.markets_loading = asyncio.create_task(self.load_markets_helper(reload, params))
try:
result = await self.markets_loading
except asyncio.CancelledError as e: # CancelledError is a base exception so we need to catch it explicitly
Expand Down
Loading