Skip to content

Commit 412a339

Browse files
committed
fix aexit for orderbook
1 parent 221105f commit 412a339

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

gdax/orderbook.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ async def __aenter__(self):
9393
return self
9494

9595
async def __aexit__(self, exc_type, exc, traceback):
96-
tasks = [self._ws_session.__aexit__(exc_type, exc, traceback)]
97-
if self.trade_log_file_path is not None:
98-
tasks.append(self._close_log_file())
99-
res = await asyncio.gather(*tasks)
100-
return tasks[0]
96+
res = await asyncio.gather(
97+
self._ws_session.__aexit__(exc_type, exc, traceback),
98+
self._close_log_file(),
99+
)
100+
return res[0]
101101

102102
async def _open_log_file(self):
103103
if self.trade_log_file_path is not None:

0 commit comments

Comments
 (0)