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

FtpStream::get() doesn't read status::CLOSING_DATA_CONNECTION #13

Open
djc opened this issue Jan 17, 2022 · 0 comments · May be fixed by #15
Open

FtpStream::get() doesn't read status::CLOSING_DATA_CONNECTION #13

djc opened this issue Jan 17, 2022 · 0 comments · May be fixed by #15

Comments

@djc
Copy link

djc commented Jan 17, 2022

While FtpStream::retr() tries to read a status after reading from the stream, it looks like FtpStream::get() doesn't do this. When we wrote some code that calls get() and completes successfully, then call FtpStream::quit(), it errored out because it read an unexpected error code off the stream:

thread 'main' panicked at 'downloader encountered a critical error: FTP InvalidResponse: Expected code [221], got response: 226 Transfer complete
', downloader/src/bin/downloader.rs:78:10

Maybe it should wrap the BufReader in another type that Derefs to the BufReader but tries to read out the status code on Drop?

@oscarwcl oscarwcl linked a pull request Apr 6, 2022 that will close this issue
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 a pull request may close this issue.

1 participant