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: update v5 wss public ping heartbeat #126

Merged
merged 1 commit into from
May 6, 2023

Conversation

josephyim224
Copy link
Contributor

No description provided.

@josephyim224
Copy link
Contributor Author

ref:

if err := s.writeMessage(websocket.TextMessage, []byte(`{"op":"ping"}`)); err != nil {

align the heartbeat message in public wss to the one in private

@josephyim224 josephyim224 mentioned this pull request May 6, 2023
if err := s.writeMessage(websocket.PingMessage, nil); err != nil {
if err := s.writeMessage(websocket.TextMessage, []byte(`{"op":"ping"}`)); err != nil {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner

@hirokisan hirokisan May 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 wss private is same as above

bybit/v5_ws_private.go

Lines 232 to 234 in 5391e16

if err := s.writeMessage(websocket.TextMessage, []byte(`{"op":"ping"}`)); err != nil {
return err
}

Copy link
Owner

@hirokisan hirokisan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

LGTM 👍

@hirokisan hirokisan merged commit d64f396 into hirokisan:main May 6, 2023
@josephyim224 josephyim224 deleted the v5-update-wss-heartbeat branch May 6, 2023 13:46
@josephyim224 josephyim224 restored the v5-update-wss-heartbeat branch May 6, 2023 13:46
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