-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Error on rotated file if new file takes time to appear
When a file's inode changes, or the `stat` call throws causes tail-file to read the remainder of the contents via a FileHandle. If the file disappears, but takes a bit to re-appear, `_readRemainderFromFileHandle()` is erroneously called twice; once for the `ENOENT` from the disappearing file, and once when the new file causes the inode to change. This commit fixes a bug where the FH is nullified after the first call, and thus throws on the subsequent call. Semver: patch Fixes: #18
- Loading branch information
1 parent
14faefe
commit 08c8472
Showing
4 changed files
with
109 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters