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

Fix network helper panic if peer close connection #899

Merged
merged 2 commits into from
May 7, 2024

Conversation

Fi3
Copy link
Collaborator

@Fi3 Fi3 commented May 7, 2024

Fix network helper panic if peer close connection

When the remote peer try to open an encrypted sv2 connection and then
immediatly close the tcp connection, the helper for async std and tokio
it panic, mostly of the time we don't want to panic in this situation.
This commit add an error for this case and return it.

When the remote peer try to open an encrypted sv2 connection and then
immediatly close the tcp connection, the helper for async std and tokio
it panic, mostly of the time we don't want to panic in this situation.
This commit add an error for this case and return it.
@pavlenex pavlenex added this to the 1.0.1 milestone May 7, 2024
@Fi3 Fi3 force-pushed the FixNetHelpers branch from cc42f38 to c14260f Compare May 7, 2024 13:00
@Fi3 Fi3 force-pushed the FixNetHelpers branch from c14260f to 6f4791c Compare May 7, 2024 13:24
@lorbax
Copy link
Collaborator

lorbax commented May 7, 2024

This PR just introduce an new variant to an error type and returns this variant in a part of the code where there was an unwrap. There is no need to do further test more than those on actions.
Looks good to me.

@Fi3 Fi3 merged commit c7cf4f5 into stratum-mining:dev May 7, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ✅
Development

Successfully merging this pull request may close these issues.

3 participants