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 graceful shutdown logic for WebSocket #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JmPotato
Copy link

@JmPotato JmPotato commented Dec 4, 2024

Before these changes, if the WebSocket client is created, the program cannot be shut down until the key interruption occurs due to the keepalive thread. This PR adds the graceful shutdown logic for WebSocket client within Info.

Close #24.

Call disconnect_websocket() when skip_ws=True:

图片

@JmPotato
Copy link
Author

JmPotato commented Dec 4, 2024

@lmlmt PTAL, thx.

@JmPotato JmPotato force-pushed the add_stop_websocket branch 3 times, most recently from 21ffe71 to c59c47c Compare December 5, 2024 04:42
hyperliquid/info.py Outdated Show resolved Hide resolved
hyperliquid/websocket_manager.py Outdated Show resolved Hide resolved
hyperliquid/info.py Outdated Show resolved Hide resolved
@JmPotato
Copy link
Author

JmPotato commented Dec 8, 2024

@lmlmt Addressed the comments, PTAL.

@JmPotato JmPotato requested a review from lmlmt December 8, 2024 07:15
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.

Websocket ping thread never ends
2 participants