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

Guard against accidental io.EOFs #429

Closed
wants to merge 1 commit into from

Conversation

puellanivis
Copy link
Collaborator

There are a number of situations where we should really be able to know that the code path doesn’t contain an io.EOF. As a precaution, we put a guard statement in each of these paths that should prevent an unintentional io.EOF from falling through.

Instead, we return ErrSSHFxConnectionLost instead. I’m not sure this is precisely the correct return value we want to use instead of an io.EOF, but I cannot think of what other kind of an error we should return.

client.go Show resolved Hide resolved
client.go Show resolved Hide resolved
@puellanivis
Copy link
Collaborator Author

Integration test failure appeared to have been caused by a race condition between two StatVFS commands returning slightly different values.

@drakkan drakkan mentioned this pull request Apr 13, 2021
@puellanivis
Copy link
Collaborator Author

This not only didn’t solve the issue we were facing, but it’s also obsoleted by the other refact, so I’m going to close this PR.

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.

1 participant