diff --git a/src/transport/smtp/client/async_connection.rs b/src/transport/smtp/client/async_connection.rs index adb0134..22ad206 100644 --- a/src/transport/smtp/client/async_connection.rs +++ b/src/transport/smtp/client/async_connection.rs @@ -194,6 +194,7 @@ impl AsyncSmtpConnection { self.panic = true; let _ = self.command(Quit).await; } + let _ = self.stream.close().await; } /// Sets the underlying stream diff --git a/src/transport/smtp/client/connection.rs b/src/transport/smtp/client/connection.rs index 6b1556a..f145be9 100644 --- a/src/transport/smtp/client/connection.rs +++ b/src/transport/smtp/client/connection.rs @@ -183,6 +183,7 @@ impl SmtpConnection { self.panic = true; let _ = self.command(Quit); } + let _ = self.stream.get_mut().shutdown(std::net::Shutdown::Both); } /// Sets the underlying stream