// make sure the connection is still open and from the same host public HttpConnection GetConnnection(Uri uri, Uri proxy, HttpConnection liveConnection) { if (liveConnection != null && liveConnection.IsConnected() && liveConnection.Uri.Host.ToLower() == uri.Host.ToLower()) { return liveConnection; } else { liveConnection.Close(); return GetConnectionPrivate(uri, proxy); } }
// make sure the connection is still open and from the same host public HttpConnection GetConnnection(Uri uri, Uri proxy, HttpConnection liveConnection) { if (liveConnection != null && liveConnection.IsConnected() && liveConnection.Uri.Host.ToLower() == uri.Host.ToLower()) { return(liveConnection); } else { liveConnection.Close(); return(GetConnectionPrivate(uri, proxy)); } }