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:
Alex Dadgar
2017-12-04 14:11:05 -08:00
committed by GitHub

View File

@@ -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()