fix waiting on gcp load balancer

This commit is contained in:
Leonard Cohnen 2022-09-13 00:23:50 +02:00 committed by 3u13r
parent 174c5896cd
commit 2a6c5df7cc

View File

@ -41,6 +41,11 @@ func ServiceIsUnavailable(err error) bool {
return true
}
// retry if GCP proxy LB isn't fully available yet
if strings.HasPrefix(statusErr.Message(), `connection error: desc = "transport: authentication handshake failed: read tcp`) {
return true
}
// ideally we would check the error type directly, but grpc only provides a string
return !strings.HasPrefix(statusErr.Message(), `connection error: desc = "transport: authentication handshake failed`)
}