Beispiel #1
0
 private void UpdateServicePoint(ServicePoint servicePoint)
 {
     if (this.lastUsedServicePoint == null)
     {
         this.lastUsedServicePoint = servicePoint;
     }
     else if ((this.lastUsedServicePoint.Host != servicePoint.Host) || (this.lastUsedServicePoint.Port != servicePoint.Port))
     {
         ConnectionPoolManager.CleanupConnectionPool(servicePoint, "");
         this.lastUsedServicePoint = servicePoint;
     }
 }
 // check to see if we're using a different servicepoint than the last
 // servicepoint used to get a connectionpool
 //
 // preconditions: servicePoint must have valid host and port (checked in SmtpClient)
 //
 // postconditions: if servicePoint is different than the last servicePoint used by this object,
 // the connection pool for the previous servicepoint will be cleaned up and servicePoint will be
 // cached to identify if it has changed in future uses of this SmtpTransport object
 private void UpdateServicePoint(ServicePoint servicePoint)
 {
     if (lastUsedServicePoint == null)
     {
         lastUsedServicePoint = servicePoint;
     }
     else if (lastUsedServicePoint.Host != servicePoint.Host ||
              lastUsedServicePoint.Port != servicePoint.Port)
     {
         ConnectionPoolManager.CleanupConnectionPool(servicePoint, "");
         lastUsedServicePoint = servicePoint;
     }
 }
Beispiel #3
0
 internal void CloseIdleConnections(ServicePoint servicePoint)
 {
     ConnectionPoolManager.CleanupConnectionPool(servicePoint, "");
 }