etishor / Metrics.NET

The Metrics.NET library provides a way of instrumenting applications with custom metrics (timers, histograms, counters etc) that can be reported in various ways and can provide insights on what is happening inside a running application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disabling/Disposing doesn't work once started without incoming resquests

sebdg opened this issue · comments

Hello,

I'm using Metrics.Net for a while now and since short I wanted to make it start/stop multiple times without unloading the AppDomain or process.
I see that the code is foreseen for such behavior.
Great work on the async part with cancellation token etc.

But there is still a caveat with the current nuget packaged version for 4.0
The Listener is blocking on its accept request and doesn't wan't to stop if there is no browser on the viz app.
I had to trick the system a bit by starting a WebRequest myself during the call to Dispose/DisableMetrics methods otherwise they are blocking forever.

Kind Regards