Skip to content

Conversation

@diegofrata
Copy link
Contributor

@diegofrata diegofrata commented Mar 3, 2017

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.

@merbla
Copy link
Contributor

merbla commented Mar 3, 2017

LGTM!

@merbla merbla merged commit 831860c into serilog-contrib:dev Mar 3, 2017
@merbla merbla mentioned this pull request Mar 3, 2017
@merbla
Copy link
Contributor

merbla commented Mar 4, 2017

@diegofrata try 2.1.3

@diegofrata
Copy link
Contributor Author

diegofrata commented Mar 4, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants