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

Don't rely on HRESULTs to detect locked bookmark files #33

Closed
nblumhardt opened this issue Aug 26, 2016 · 0 comments
Closed

Don't rely on HRESULTs to detect locked bookmark files #33

nblumhardt opened this issue Aug 26, 2016 · 0 comments
Labels

Comments

@nblumhardt
Copy link
Member

The durable log shipper checks the HRESULT behind an IOException in order to detect locked log files.

https://github.com/serilog/serilog-sinks-seq/blob/dev/src/Serilog.Sinks.Seq/Sinks/Seq/HttpLogShipper.cs#L397

Since this is exposed in .NET Core we didn't pick it up in the migration, but obviously this won't work on non-Windows platforms (https://github.com/dotnet/corefx/issues/11144).

It's probably safe to assume on .NET Core that any IOException here indicates a locked file, we're only doing the check to improve diagnostics.

Thanks @ghuntley for raising this 👍

@nblumhardt nblumhardt added the bug label Aug 26, 2016
nblumhardt added a commit that referenced this issue Oct 4, 2016
Fixes #33 - HRESULTs are only generally available on .NET Framework
@nblumhardt nblumhardt mentioned this issue Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant