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

Add context handling to DerivAPI client #14

Merged
merged 4 commits into from
Aug 18, 2024
Merged

Conversation

ksysoev
Copy link
Owner

@ksysoev ksysoev commented Aug 18, 2024

This pull request adds context handling to the DerivAPI client. It includes the following changes:

  • Adds context to the API client struct

  • Adds context handling in the request sender and response handler functions

  • Adds a cancel function to the DerivAPI struct

  • Updates the Connect and Disconnect functions to use the cancel function

  • Updates the requestSender and handleResponses functions to check for context cancellation

  • Updates the requestMapper function to check for context cancellation

  • Adds a check for context cancellation in the SendRequest function

These changes improve the handling of context in the DerivAPI client, ensuring that requests can be cancelled when necessary.

@ksysoev ksysoev merged commit e800a6c into main Aug 18, 2024
3 checks passed
@ksysoev ksysoev deleted the refactor_closing_connection branch August 18, 2024 03:38
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