From fcdef7bc6e5008b5a60138891a2eaf35c6f55a36 Mon Sep 17 00:00:00 2001 From: Alex Hong Date: Wed, 7 Jul 2021 11:44:17 -0700 Subject: [PATCH] fix(pubsub): retry all goaway errors --- pubsub/service.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pubsub/service.go b/pubsub/service.go index 0c24be25a69..1a29df03ecb 100644 --- a/pubsub/service.go +++ b/pubsub/service.go @@ -64,8 +64,7 @@ func (r *defaultRetryer) Retry(err error) (pause time.Duration, shouldRetry bool return 0, false case codes.Unknown: // Retry GOAWAY, see https://github.com/googleapis/google-cloud-go/issues/4257. - isGoaway := strings.Contains(s.Message(), "error reading from server: EOF") && - strings.Contains(s.Message(), "received prior goaway") + isGoaway := strings.Contains(s.Message(), "received prior goaway: code: NO_ERROR") if isGoaway { return r.bo.Pause(), true }