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

Missing Unsubscribe Methods for WebSocket Streams in JSON-RPC #3216

Open
blouflashdb opened this issue Dec 30, 2024 · 0 comments
Open

Missing Unsubscribe Methods for WebSocket Streams in JSON-RPC #3216

blouflashdb opened this issue Dec 30, 2024 · 0 comments

Comments

@blouflashdb
Copy link

Missing Unsubscribe Methods for WebSocket Streams in JSON-RPC

The current implementation of the JSON-RPC offers the ability to subscribe to WebSocket streams, which is a great feature. However, there appears to be a critical issue: there is no corresponding unsubscribe method available to gracefully close these streams.

This absence creates challenges in managing resources effectively, especially in scenarios where multiple subscriptions are created dynamically. Without a proper unsubscribe method, it becomes difficult to cleanly terminate streams, leading to potential memory leaks and unnecessary resource consumption on both the client and server sides.

To address this, I suggest adding an unsubscribe method for each available subscription type. This would allow developers to properly close WebSocket streams when they are no longer needed, ensuring a cleaner and more efficient implementation.

Let me know if further details are needed, or if you'd like help testing any changes!

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

No branches or pull requests

1 participant