diff --git a/client/rpc_client.go b/client/rpc_client.go index e02744e2..5e8d0f59 100644 --- a/client/rpc_client.go +++ b/client/rpc_client.go @@ -467,10 +467,10 @@ func (r *rpcClient) Stream(ctx context.Context, request Request, opts ...CallOpt var grr error for i := 0; i <= callOpts.Retries; i++ { - go func() { + go func(i int) { s, err := call(i) ch <- response{s, err} - }() + }(i) select { case <-ctx.Done():