We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a251e38 commit 42e5e03Copy full SHA for 42e5e03
src/smtp/client/inner.rs
@@ -207,13 +207,8 @@ impl<S: Connector + Write + Read + Unpin> InnerClient<S> {
207
command: C,
208
timeout: Option<&Duration>,
209
) -> SmtpResult {
210
- with_timeout(timeout, async {
211
- self.as_mut().write(command.to_string().as_bytes()).await?;
212
- let res = self.read_response_no_timeout().await?;
213
-
214
- Ok(res)
215
- })
216
- .await
+ with_timeout(timeout, self.as_mut().write(command.to_string().as_bytes())).await?;
+ with_timeout(timeout, self.read_response_no_timeout()).await
217
}
218
219
/// Writes the given data to the server.
0 commit comments