Skip to content

Commit

Permalink
Retry dial and connection errors for grpc stream. (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
kartlee authored Jun 13, 2020
1 parent 5be27de commit b28fb2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,13 @@ func (s *serverStreamingRetryingStream) RecvMsg(m interface{}) error {
callCtx := perCallContext(s.parentCtx, s.callOpts, attempt)
newStream, err := s.reestablishStreamAndResendBuffer(callCtx)
if err != nil {
// TODO(mwitkow): Maybe dial and transport errors should be retriable?
// Retry dial and transport errors of establishing stream as grpc doesn't retry.
if isRetriable(err, s.callOpts) {
continue
}
return err
}

s.setStream(newStream)
attemptRetry, lastErr = s.receiveMsgAndIndicateRetry(m)
//fmt.Printf("Received message and indicate: %v %v\n", attemptRetry, lastErr)
Expand Down

0 comments on commit b28fb2b

Please sign in to comment.