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?
While
FtpStream::retr()
tries to read a status after reading from the stream, it looks likeFtpStream::get()
doesn't do this. When we wrote some code that callsget()
and completes successfully, then callFtpStream::quit()
, it errored out because it read an unexpected error code off the stream:Maybe it should wrap the
BufReader
in another type thatDeref
s to theBufReader
but tries to read out the status code onDrop
?