Skip to content

Commit

Permalink
More alterations
Browse files Browse the repository at this point in the history
  • Loading branch information
janderson-seg committed Dec 8, 2023
1 parent 0fde9a5 commit 50ff049
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/event/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ func (c *fileChangelog) read(ctx context.Context, fsNotifyCh chan fsnotify.Event
// loop and read as many lines as possible.
for {
err = readEvents(logCount)
logCount = 0
if err != io.EOF {
return errors.Wrap(err, "read bytes")
}
Expand All @@ -210,7 +211,8 @@ func (c *fileChangelog) read(ctx context.Context, fsNotifyCh chan fsnotify.Event
//events.Debug("Manually checking log")
continue
case err := <-fsErrCh:
if err := readEvents(logCount); err != io.EOF {
events.Debug("err channel: %{error}s", err)
if err := readEvents(-1); err != io.EOF {
events.Log("could not consume rest of file: %{error}s", err)
}
return errors.Wrap(err, "watcher error")
Expand Down

0 comments on commit 50ff049

Please sign in to comment.