-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop FlushAsync from preventing application exit #227
Stop FlushAsync from preventing application exit #227
Conversation
I've tested this and can confirm it resolves the issue I reported - thanks. |
@luigiberrettini Any chance of having this merged along with #217, since actual bugs? |
A different strategy has to be chosen to avoid regression and solve the bug reported in this issue |
The SysLog-target is the one with the buggy-FlushAync-method. If the syslog-target behaved as intended, then you will notice that LogManager.Flush()-method will nicely wait for the FlushAsync to call the provided This PR is the correct way of implementing the FlushAsync-method. And it also fixes the currently broken contract between InitializeTarget and CloseTarget. |
I will perform some tests to see if everything works and see if I want to proceed this way, thanks for contributing! |
Both #147 and #226 are solved without using a Wait and just adopting NLog conventions properly as @snakefoot suggested while my brain was rejecting the idea |
Closes #226