Skip to content

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

@0x7u

Description

@0x7u

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions