Skip to content

Should KaspaRpcClient implement Drop to clean up ressources (RAII)? #683

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

Open
0x7u opened this issue May 16, 2025 · 0 comments
Open

Should KaspaRpcClient implement Drop to clean up ressources (RAII)? #683

0x7u opened this issue May 16, 2025 · 0 comments

Comments

@0x7u
Copy link

0x7u commented May 16, 2025

Is your feature request related to a problem? Please describe.
I have just played around with kaspa-wrpc-client and used the KaspaRpcClient.
I noticed an unusual usage of the CPU (in kernel mode). Turns out I wasn't closing connections established with the client.

Describe the solution you'd like
I believe the Rust community is leaning towards RAII, to prevent this kind of issues.

Describe alternatives you've considered
I am okay with the current status.

Additional context
I am just fetching for feedback.
Is it because stop or disconnect is async code?

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