Skip to content
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

Fix a potential race condition in FileSubscriber #5032

Merged

Conversation

ismaelhamed
Copy link
Member

Port #19594

This basically does the same thing @Arkatufus did in #4874 but uses the original code. Up to you guys.

@@ -176,8 +166,8 @@ protected override bool Receive(object message)
}
catch (Exception ex)
{
_log.Error(ex, $"Tearing down FileSink({_f.FullName}). File flush failed.");
_completionPromise.TrySetResult(IOResult.Failed(_bytesWritten, ex));
_log.Error(ex, "Tearing down FileSink({0}). File flush failed.", _f.FullName);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows loggers like Serilog to properly apply the output template.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb added this to the 1.4.21 milestone May 22, 2021
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) May 22, 2021 16:19
@Aaronontheweb Aaronontheweb merged commit 61d08b7 into akkadotnet:dev May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants