Skip to content

Commit

Permalink
Fix SmtpClient handling exceptions as timeouts (#288)
Browse files Browse the repository at this point in the history
Only non-async calls on SmtpClient can timeout. As the flag is not reset in the async path, it could already be set and SmtpClient would propagate any exception in the async path as a timeout
  • Loading branch information
MihaZupan authored and davidsh committed Nov 27, 2019
1 parent 92a160d commit d0974b8
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,6 @@ public void SendAsync(MailMessage message, object userToken)
}

Abort();
if (_timedOut)
{
throw new SmtpException(SR.net_timeout);
}

if (e is SecurityException ||
e is AuthenticationException ||
Expand Down

0 comments on commit d0974b8

Please sign in to comment.