You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had trouble with using ImplAsyncFtpStream::abort() correctly. Apparently it is possible to only pass a mutable reference for data_stream instead of full ownership, so the drop does not work.
Steps to reproduce
let _ = env_logger::builder().is_test(true).try_init();use suppaftp::{AsyncFtpStream,Mode};letmut ftp_stream = AsyncFtpStream::connect("127.0.0.1:1234").await?;
ftp_stream.login("anonymous","anonymous").await?;
ftp_stream.set_mode(Mode::ExtendedPassive);letmut stream = ftp_stream.retr_as_stream("foo").await?;// only pass &mut:
ftp_stream.abort(&mut stream).await?;// this code will never actually be reached:loop{dbg!();}
Expected behaviour
abort() does not block indefinitely, or rather, it should be impossible to pass a reference here.
Description
I had trouble with using ImplAsyncFtpStream::abort() correctly. Apparently it is possible to only pass a mutable reference for
data_stream
instead of full ownership, so the drop does not work.Steps to reproduce
Expected behaviour
abort()
does not block indefinitely, or rather, it should be impossible to pass a reference here.Environment
Additional information
Last lines from trace log:
The text was updated successfully, but these errors were encountered: