Skip to content

Commit

Permalink
Fix QUIC stream handle leak (#56550)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarnaViire committed Jul 30, 2021
1 parent 58232e0 commit acb6b9b
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,13 @@ private static uint HandleEventConnectionClose(State state)
ExceptionDispatchInfo.SetCurrentStackTrace(GetConnectionAbortedException(state)));
}

// Dispose was called before complete event.
bool releaseHandles = Interlocked.Exchange(ref state.ShutdownDone, 2) == 1;
if (releaseHandles)
{
state.Cleanup();
}

return MsQuicStatusCodes.Success;
}

Expand Down

0 comments on commit acb6b9b

Please sign in to comment.