internal void Abort() { if (_connection != null) { _connection.Abort(); } }
internal void GetConnection(string host, int port) { try { lock (this) { _connection = new SmtpConnection(this, _client, _credentials, _authenticationModules); if (_shouldAbort) { _connection.Abort(); } _shouldAbort = false; } if (NetEventSource.IsEnabled) { NetEventSource.Associate(this, _connection); } if (EnableSsl) { _connection.EnableSsl = true; _connection.ClientCertificates = ClientCertificates; } _connection.GetConnection(host, port); } finally { } }
internal void Abort() { lock (this) { if (_connection != null) { _connection.Abort(); } else { _shouldAbort = true; } } }