Skip to content

Commit

Permalink
[EventPipe] Handle EventPipe Enable calls during shutdown (#105842)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdh1418 committed Aug 6, 2024
1 parent 6cdc448 commit 50d6cad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/coreclr/vm/eventpipeinternal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ extern "C" UINT64 QCALLTYPE EventPipeInternal_Enable(
nullptr,
nullptr,
nullptr);
EventPipeAdapter::StartStreaming(sessionID);
if (sessionID != 0)
{
EventPipeAdapter::StartStreaming(sessionID);
}
}
END_QCALL;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private void CommitDispatchConfiguration()
ulong sessionID = EventPipeInternal.Enable(null, EventPipeSerializationFormat.NetTrace, DefaultEventListenerCircularMBSize, providerConfiguration);
if (sessionID == 0)
{
throw new EventSourceException(SR.EventSource_CouldNotEnableEventPipe);
return;
}

// Get the session information that is required to properly dispatch events.
Expand Down

0 comments on commit 50d6cad

Please sign in to comment.