feat(ws-client): respond with pong to ping messages#12
Merged
gioto64 merged 1 commit intoelliottech:mainfrom Oct 23, 2025
Merged
feat(ws-client): respond with pong to ping messages#12gioto64 merged 1 commit intoelliottech:mainfrom
gioto64 merged 1 commit intoelliottech:mainfrom
Conversation
Contributor
hmate9
commented
May 17, 2025
- Update WsClient to automatically send a "pong" message in response to any received "ping" message, for both sync and async websocket usage.
- Adds ping detection in on_message and on_message_async.
- Sends back a {"type": "pong"} payload.
- No breaking changes; existing subscriptions and message flows are unaffected.
- Update WsClient to automatically send a "pong" message in response to any received "ping" message, for both sync and async websocket usage.
- Adds ping detection in on_message and on_message_async.
- Sends back a {"type": "pong"} payload.
- No breaking changes; existing subscriptions and message flows are unaffected.
|
Why on Earth this PR isn’t merged? |
Ge0
reviewed
Oct 4, 2025
| self.handle_subscribed_account(message) | ||
| elif message_type == "update/account_all": | ||
| self.handle_update_account(message) | ||
| elif message_type == "ping": |
There was a problem hiding this comment.
Not needed, as you handle the ping case below.
There was a problem hiding this comment.
I think we need this when using synchronous run without asyncio.
|
I also encountered this problem when running ws.py in the example. It seems that it has not been solved. What should I do? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.