Skip to content

Commit

Permalink
Fix: Add missing calls to set @InCall=false
Browse files Browse the repository at this point in the history
This also fix nilnull#20 issue.
  • Loading branch information
carlosbet committed Jun 29, 2022
1 parent cf4022b commit ec8fef7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion AegisImplictMail/SmtpSocketClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,10 @@ public bool TestConnection()
var result = EstablishSmtp();
string response;
int code;
if (_con != null)
if (_con != null && _con.Connected)
QuiteConnection(out response, out code);

InCall = false;
return result;
}
}
Expand Down Expand Up @@ -912,6 +914,7 @@ public void SendMail(AbstractMailMessage message)
SendCompleted(this, new AsyncCompletedEventArgs(null, false, response));
}
}
InCall = false;
}
}

Expand Down

0 comments on commit ec8fef7

Please sign in to comment.