Suppress "transport is closing" errors. (#4394)

These errors show up in the Publisher at shutdown during integration
test runs, because the Publisher is trying to write responses from RPCs
that were slow due to the ct-test-srv's LatencySchedule. This
specifically happens only for the optional submission of "final"
certificates.
This commit is contained in:
Jacob Hoffman-Andrews 2019-08-07 13:39:53 -07:00 committed by Roland Bracewell Shoemaker
parent 751e3b1704
commit e20eb6271d
1 changed files with 5 additions and 1 deletions

View File

@ -108,7 +108,11 @@ func (log grpcLogger) Error(args ...interface{}) {
log.Logger.AuditErr(fmt.Sprintln(args...))
}
func (log grpcLogger) Errorf(format string, args ...interface{}) {
log.Logger.AuditErrf(format, args...)
output := fmt.Sprintf(format, args...)
if output == `grpc: Server.processUnaryRPC failed to write status: connection error: desc = "transport is closing"` {
return
}
log.Logger.AuditErr(output)
}
func (log grpcLogger) Errorln(args ...interface{}) {
log.Logger.AuditErr(fmt.Sprintln(args...))