mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Merge pull request #3555 from PagerDuty/fix-loop-on-sigpipe
Do not emit logs on SIGPIPE since logging service could be unavailable
This commit is contained in:
@@ -548,13 +548,14 @@ WAIT:
|
||||
case <-c.retryJoinErrCh:
|
||||
return 1
|
||||
}
|
||||
c.Ui.Output(fmt.Sprintf("Caught signal: %v", sig))
|
||||
|
||||
// Skip any SIGPIPE signal (See issue #1798)
|
||||
// Skip any SIGPIPE signal and don't try to log it (See issues #1798, #3554)
|
||||
if sig == syscall.SIGPIPE {
|
||||
goto WAIT
|
||||
}
|
||||
|
||||
c.Ui.Output(fmt.Sprintf("Caught signal: %v", sig))
|
||||
|
||||
// Check if this is a SIGHUP
|
||||
if sig == syscall.SIGHUP {
|
||||
c.handleReload()
|
||||
|
||||
Reference in New Issue
Block a user