You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
committed by
Jo Shields
parent
aa7da660d6
commit
c042cd0c52
@@ -275,7 +275,7 @@ namespace System.Net
|
||||
groups.Remove (group.Name);
|
||||
}
|
||||
|
||||
internal bool CheckAvailableForRecycling (out DateTime outIdleSince)
|
||||
bool CheckAvailableForRecycling (out DateTime outIdleSince)
|
||||
{
|
||||
outIdleSince = DateTime.MinValue;
|
||||
|
||||
@@ -312,7 +312,7 @@ namespace System.Net
|
||||
lock (this) {
|
||||
idleSince = outIdleSince;
|
||||
|
||||
if (removeList != null) {
|
||||
if (removeList != null && groups != null) {
|
||||
foreach (var group in removeList)
|
||||
if (groups.ContainsKey (group.Name))
|
||||
RemoveConnectionGroup (group);
|
||||
@@ -401,14 +401,21 @@ namespace System.Net
|
||||
}
|
||||
public bool CloseConnectionGroup (string connectionGroupName)
|
||||
{
|
||||
WebConnectionGroup cncGroup = null;
|
||||
|
||||
lock (this) {
|
||||
WebConnectionGroup cncGroup = GetConnectionGroup (connectionGroupName);
|
||||
cncGroup = GetConnectionGroup (connectionGroupName);
|
||||
if (cncGroup != null) {
|
||||
cncGroup.Close ();
|
||||
return true;
|
||||
RemoveConnectionGroup (cncGroup);
|
||||
}
|
||||
}
|
||||
|
||||
// WebConnectionGroup.Close() must *not* be called inside the lock
|
||||
if (cncGroup != null) {
|
||||
cncGroup.Close ();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user