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

[okex-stream] all login-required channels become invalid after a network disconnection and reconnection #4968

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

lvxiao1
Copy link
Contributor

@lvxiao1 lvxiao1 commented Nov 25, 2024

fix(okex): Fix issue with resubscribing to channels after login

  • Added loginDone and needToResubscribeChannels flags
  • Initialized the loginDone flag during connection setup
  • Implemented the resubscribeChannels method to decide whether to resubscribe based on login status
  • Checked if channel resubscription is needed after a successful login

Steps to Reproduce:

  1. Use the getUserTrades method to subscribe to order events.
  2. Disconnect and then reconnect the network.
  3. Place order on OKX; the order events will not be received.

image
image

- Added `loginDone` and `needToResubscribeChannels` flags
- Initialized the `loginDone` flag during connection setup
- Implemented the `resubscribeChannels` method to decide whether to resubscribe based on login status
- Checked if channel resubscription is needed after a successful login
@timmolter timmolter merged commit c20907c into knowm:develop Nov 25, 2024
1 check 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.

2 participants