Skip to content

Commit

Permalink
Fix Interactive Brokers client start (#1551)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminsingleton authored Mar 21, 2024
1 parent 8642500 commit 63dabdd
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 95 deletions.
4 changes: 2 additions & 2 deletions nautilus_trader/adapters/interactive_brokers/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ async def _run_internal_msg_queue_processor(self) -> None:
Continuously process messages from the internal incoming message queue.
"""
self._log.debug(
"Client internal message queue started.",
"Client internal message queue processor started.",
)
try:
while (
Expand All @@ -548,7 +548,7 @@ async def _run_internal_msg_queue_processor(self) -> None:
)
)
finally:
self._log.debug("Client TWS incoming message reader stopped.")
self._log.debug("Internal message queue processor stopped.")

def _process_message(self, msg: str) -> bool:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ async def _handle_reconnect(self) -> None:
)
await asyncio.sleep(self._reconnect_delay)
await self._startup()
await self._resubscribe_all() # should this not be done in _resume?
self._resume()
else:
self._reconnect_attempts = 0

self._log.info("Reconnection successful.")
self._reconnect_attempts = 0
await self._resubscribe_all()
self._resume()

def _initialize_connection_params(self) -> None:
"""
Expand Down
Loading

0 comments on commit 63dabdd

Please sign in to comment.