-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
RetryingWrapper - Allow closing target, even when busy retrying #1926
RetryingWrapper - Allow closing target, even when busy retrying #1926
Conversation
d338aff
to
7a148f3
Compare
Current coverage is 82% (diff: 92%)@@ master #1926 diff @@
==========================================
Files 285 285
Lines 19496 19535 +39
Methods 2961 2962 +1
Messages 0 0
Branches 2277 2286 +9
==========================================
+ Hits 15879 15927 +48
+ Misses 3072 3060 -12
- Partials 545 548 +3
|
7a148f3
to
63493c4
Compare
And thanks again!! |
Oops missed that one. |
|
#1933 should fix this IMO. I assume that the sleep-retry logic is safe without lock. |
@304NotModified When overriding WriteAsyncThreadSafe(), then it will never reach the normal Write(). This is intended as the normal Write() is called after having taken target-lock. It is the target-lock I want to avoid as it blocks one from flushing and closing the target. If you re-introduce the RetryingTargetWrapper-Write() again then it will never be reached. The sleep-retry-logic was before protected against reordering by the Write-Target-lock, with this change then it is protected against reordering by the RetrySyncObject-lock. |
If wrapped target is working on retrying for ever, then it should not block one from closing target.
This is a breaking change, as the RetryingWrapper is not sealed. Has to wait for NLog 5.0
This change is