Skip to content

Commit

Permalink
Fix issue where the reloadNginx function never finishes (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhurley authored Aug 17, 2023
1 parent 0f28539 commit 81b8d9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions src/plugins/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -631,9 +631,6 @@ func (n *Nginx) tailLog(logFile string, errorChannel chan string) {
data := make(chan string, 1024)
go t.Tail(ctx, data)

tick := time.NewTicker(n.config.Nginx.ConfigReloadMonitoringPeriod)
defer tick.Stop()

for {
select {
case d := <-data:
Expand All @@ -648,10 +645,8 @@ func (n *Nginx) tailLog(logFile string, errorChannel chan string) {
return
}
}
case <-tick.C:
errorChannel <- ""
return
case <-ctx.Done():
errorChannel <- ""
return
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 81b8d9d

Please sign in to comment.