Skip to content

Commit 6dbf89d

Browse files
committed
Merge in 'release/6.0' changes
2 parents f66e95c + bdd6647 commit 6dbf89d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,8 @@ static int ScavengeConnectionList<T>(List<T> list, ref List<HttpConnectionBase>?
20042004
if (freeIndex < list.Count)
20052005
{
20062006
// We know the connection at freeIndex is unusable, so dispose of it.
2007-
toDispose ??= new List<HttpConnectionBase> { list[freeIndex] };
2007+
toDispose ??= new List<HttpConnectionBase>();
2008+
toDispose.Add(list[freeIndex]);
20082009

20092010
// Find the first item after the one to be removed that should be kept.
20102011
int current = freeIndex + 1;

0 commit comments

Comments
 (0)