groups.Remove (group.Name);
}
- internal bool CheckAvailableForRecycling (out DateTime outIdleSince)
+ bool CheckAvailableForRecycling (out DateTime outIdleSince)
{
outIdleSince = DateTime.MinValue;
if (removeList != null) {
foreach (var group in removeList)
- RemoveConnectionGroup (group);
+ if (groups.ContainsKey (group.Name))
+ RemoveConnectionGroup (group);
}
if (groups != null && groups.Count == 0)
protocolVersion = version;
}
-#if !TARGET_JVM
internal EventHandler SendRequest (HttpWebRequest request, string groupName)
{
WebConnection cnc;
return cnc.SendRequest (request);
}
-#endif
public bool CloseConnectionGroup (string connectionGroupName)
{
lock (this) {
WebConnectionGroup cncGroup = GetConnectionGroup (connectionGroupName);
if (cncGroup != null) {
cncGroup.Close ();
+ RemoveConnectionGroup (cncGroup);
return true;
}
}