Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(watchdog): keep connected, reconnect with code 1100/2110 #234

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

ceddybi
Copy link
Member

@ceddybi ceddybi commented Jan 12, 2025

BUGS:

  • When you set a reconnectInterval: 1000, connectionWatchdogInterval: 1, even if you're connected runWatchdog disconnects and tries to create a new connection.
  • FIX: If we already have a connection, no need to trigger reconnect, we should keep the current connection.
  • When you're connected and you lose internet connection (e.i TWS loses connection to IBKR servers), it takes a while for Socket.onEnd to get triggered, but TWS already sends code 1100 and 2110)
  • FIX: if we receive codes 1100/2110, it means we're not connected to the server, we trigger watchdog to try and reconnect.

@ceddybi ceddybi requested review from rylorin, Tsopic and mfrener January 12, 2025 21:41
Copy link

codeclimate bot commented Jan 12, 2025

Code Climate has analyzed commit 5d4f062 and detected 0 issues on this pull request.

View more on Code Climate.

@ceddybi
Copy link
Member Author

ceddybi commented Jan 13, 2025

Test Suites: 3 failed, 46 passed, 49 total
Tests:       3 failed, 119 passed, 122 total
Snapshots:   0 total
Time:        71.605 s

@ceddybi ceddybi merged commit 3e8f420 into stoqey:master Jan 14, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant