-
Notifications
You must be signed in to change notification settings - Fork 3k
ssh: ssh_sftp improve window related error handling #10035
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
ssh: ssh_sftp improve window related error handling #10035
Conversation
CT Test Results 2 files 29 suites 18m 46s ⏱️ Results for commit 99ff120. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
864b211
to
11ccf21
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors SFTP file operations to use the maybe ... end
construct with ?=
for streamlined error matching and propagation.
- Replaces
case
statements and direct=
matches inopen/recv_window/send_window
withmaybe
blocks - Updates
read_file
,write_file
,read_repeat
,read_buf
,write_to_remote_tar
, andwrite_buf
to the new pattern - Consolidates cleanup and error return logic under unified
maybe
expressions
Comments suppressed due to low confidence (1)
lib/ssh/src/ssh_sftp.erl:1027
- Add tests for error paths in the new
maybe
blocks (e.g., open/recv_window/send_window failures) to ensure correct propagation and cleanup behavior.
maybe
11ccf21
to
99ff120
Compare
No description provided.