Skip to content

Guard against accidental io.EOFs - #429

Closed
puellanivis wants to merge 1 commit into
masterfrom
patch/force-eof-to-connection-lost
Closed

puellanivis wants to merge 1 commit into
masterfrom
patch/force-eof-to-connection-lost

Conversation

@puellanivis

Copy link
Copy Markdown
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.

Comment thread client.go Resolved
Comment thread client.go Resolved
@puellanivis

Copy link
Copy Markdown
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
Copy Markdown
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