Closed diegofrata closed 7 years ago
LGTM!
Thanks a lot. Will update on Monday! On Sat, 4 Mar 2017 at 02:01, Matthew Erbs notifications@github.com wrote:
@diegofrata https://github.com/diegofrata try 2.1.3 https://www.nuget.org/packages/Serilog.Sinks.Splunk/2.1.3
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/serilog/serilog-sinks-splunk/pull/45#issuecomment-284117985, or mute the thread https://github.com/notifications/unsubscribe-auth/AASwT_mU11MkhDvCNyAzdzM9ku6VBNywks5riMYKgaJpZM4MSJ0D .
Basically, if you call Dsipose from the UI thread, or any other thread that has a synchronization context, it blocks and waits for the Send to complete. But then _httpClient.SendAsync tries to complete in the original context, but it can't because it's already blocked. Since there's no timeout, it gets deadlocked forever.
Adding the ConfigureAwait(false) causes the _httpClient request to be completed in the thread pool instead, avoiding the deadlock.