Skip to content

Commit

Permalink
Restore old timing of systemd.NotifyReady()
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Sep 5, 2024
1 parent f55f2a9 commit ba61f9d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ func runWithConfig(cmd *cobra.Command, args []string, config analyze.AnalyzerCon
return err
} else {
// Tail mode
var errCh chan error
go func() {
errCh <- analyzer.TailFile(filenames[0])
}()
iter, err := analyzer.OpenTailIterator(filenames[0])
if err != nil {
return err
}

if config.Daemon {
if err := systemd.NotifyReady(); err != nil {
Expand All @@ -78,7 +78,7 @@ func runWithConfig(cmd *cobra.Command, args []string, config analyze.AnalyzerCon
go tui.New(analyzer).Run()
}

return <-errCh
return analyzer.RunLoop(iter)
}
}

Expand Down

0 comments on commit ba61f9d

Please sign in to comment.