Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix issue where HTTP2 connection could be scavenged but not disposed
  • Loading branch information
Geoffrey Kizer committed Dec 1, 2021
commit c2f878d54a3de07643e6f0a2b23b5cacf5aa00ab
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,8 @@ static int ScavengeConnectionList<T>(List<T> list, ref List<HttpConnectionBase>?
if (freeIndex < list.Count)
{
// We know the connection at freeIndex is unusable, so dispose of it.
toDispose ??= new List<HttpConnectionBase> { list[freeIndex] };
toDispose ??= new List<HttpConnectionBase>();
toDispose.Add(list[freeIndex]);

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