jjchiw / gelf4net

GELF log4net Appender - graylog2
MIT License
63 stars 59 forks source link

Async void should not be used. #58

Closed rolfwessels closed 6 years ago

rolfwessels commented 6 years ago

The http appender seems to work fine from my console application but when running an owin web api, I get the following error

[InvalidOperationException: An asynchronous module or handler completed while an asynchronous operation was still pending.] The following stack post explains the reason why.

https://stackoverflow.com/questions/28805796/asp-net-controller-an-asynchronous-module-or-handler-completed-while-an-asynchr

I update the code to use ContinuesWith. I tested the fix in my existing code and seems to work.

This should also resolve https://github.com/jjchiw/gelf4net/issues/50

rolfwessels commented 6 years ago

Hmm, that failure does not seem to be related to the code I changed.

jjchiw commented 6 years ago

Thanks!!

I pushed a new package

:)