Skip to content

Commit

Permalink
clean-up logTail after cancelling or exit
Browse files Browse the repository at this point in the history
  • Loading branch information
lostbean committed Jan 5, 2024
1 parent ae4de77 commit a4fff13
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ func (strategy *PerWeekStreamLogsStrategy) followLogs(
if err != nil {
return stacktrace.Propagate(err, "An error occurred while attempting to tail the log file.")
}
defer func() {
logTail.Stop()

Check failure on line 380 in engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy.go

View workflow job for this annotation

GitHub Actions / golang-lint

Error return value of `logTail.Stop` is not checked (errcheck)
logTail.Cleanup()
}()

for {
select {
Expand Down

0 comments on commit a4fff13

Please sign in to comment.