Skip to content

Commit

Permalink
Update internal/net/grpc/status/status.go
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Yusuke Kato <[email protected]>
  • Loading branch information
kpango and coderabbitai[bot] authored Sep 21, 2024
1 parent 25c6bd6 commit 3847fe2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions internal/net/grpc/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,7 @@ func withDetails(st *Status, err error, details ...any) *Status {
for _, msg := range ds {
r, ok := msg.(*errdetails.RetryInfo)
if ok && r != nil {
if m.GetRetryDelay().GetSeconds() == 0 &&
r.GetRetryDelay().GetSeconds() != 0 {
m.RetryDelay = r.GetRetryDelay()
} else if m.GetRetryDelay().GetSeconds() > r.GetRetryDelay().GetSeconds() {
if m.GetRetryDelay() == nil || r.GetRetryDelay().Seconds < m.GetRetryDelay().Seconds {
m.RetryDelay = r.GetRetryDelay()
}
}
Expand Down

0 comments on commit 3847fe2

Please sign in to comment.