summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSung Yoon Whang <suwhang@microsoft.com>2019-05-10 16:59:38 -0700
committerGitHub <noreply@github.com>2019-05-10 16:59:38 -0700
commit15c4e02037e535a898ddd24390894adc8f3b5b06 (patch)
treef04ef84b39b952b4cb96324b7bb5f7b7e8a5b084 /src
parent2bfb6a8516fd20a39c242800854e0a19336589f7 (diff)
downloadcoreclr-15c4e02037e535a898ddd24390894adc8f3b5b06.tar.gz
coreclr-15c4e02037e535a898ddd24390894adc8f3b5b06.tar.bz2
coreclr-15c4e02037e535a898ddd24390894adc8f3b5b06.zip
Fix EventCounter disable logic (#24519)
Diffstat (limited to 'src')
-rw-r--r--src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/CounterGroup.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/CounterGroup.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/CounterGroup.cs
index c60ba36886..d669114d50 100644
--- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/CounterGroup.cs
+++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/CounterGroup.cs
@@ -64,6 +64,13 @@ namespace System.Diagnostics.Tracing
}
}
}
+ else if (e.Command == EventCommand.Disable)
+ {
+ lock (this)
+ {
+ _pollingIntervalInMilliseconds = 0;
+ }
+ }
}
#endregion // EventSource Command Processing