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 the ability for CLI commands to track and close an RPC client #5172

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

mat-if
Copy link
Contributor

@mat-if mat-if commented Jul 24, 2024

Summary

With the addition of the JSON changes, which requires us to await on the start command in the IronfishCommand, commands that used this.sdk.connectRpc() were hanging because the clients were not being closed. This change allows us to fetch a client from the IronfishCommand directly, which gives the IronfishCommand the ability to track the client, and close it when the code is done being ran/executed.

Closes IFL-2823

Testing Plan

Documentation

N/A

Breaking Change

N/A

With the addition of the JSON changes, which requires us to await on the start
command in the IronfishCommand, commands that used `this.sdk.connectRpc()` were
hanging because the clients were not being closed. This change allows us to
fetch a client from the IronfishCommand directly, which gives the
IronfishCommand the ability to track the client, and close it when the code is
done being ran/executed.
@mat-if mat-if requested a review from a team as a code owner July 24, 2024 00:06
@NullSoldier
Copy link
Contributor

This looks good, and should prevent issues where commands don't clean up their clients and cause commands to hang.

@mat-if mat-if merged commit 04d941b into staging Jul 24, 2024
9 checks passed
@mat-if mat-if deleted the mat/close-clients branch July 24, 2024 17:17
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