Skip to content

Commit

Permalink
non-blocking call chan when retries are 0
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Apr 18, 2019
1 parent 722a368 commit f824ba0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/rpc_client.go
Expand Up @@ -382,7 +382,7 @@ func (r *rpcClient) Call(ctx context.Context, request Request, response interfac
return err
}

ch := make(chan error, callOpts.Retries)
ch := make(chan error, callOpts.Retries+1)
var gerr error

for i := 0; i <= callOpts.Retries; i++ {
Expand Down Expand Up @@ -463,7 +463,7 @@ func (r *rpcClient) Stream(ctx context.Context, request Request, opts ...CallOpt
err error
}

ch := make(chan response, callOpts.Retries)
ch := make(chan response, callOpts.Retries+1)
var grr error

for i := 0; i <= callOpts.Retries; i++ {
Expand Down

0 comments on commit f824ba0

Please sign in to comment.