提交 413dc1d2 编写于 作者: B bloonfield 提交者: Péter Szilágyi

rpc: fix closure problem in batch processing (#14688)

Demo of the issue: https://play.golang.org/p/EeTLFfppqC
上级 fdf2184b
......@@ -103,8 +103,8 @@ func (c *Client) sendBatchHTTP(ctx context.Context, op *requestOp, msgs []*jsonr
if err := json.NewDecoder(respBody).Decode(&respmsgs); err != nil {
return err
}
for _, respmsg := range respmsgs {
op.resp <- &respmsg
for i := 0; i < len(respmsgs); i++ {
op.resp <- &respmsgs[i]
}
return nil
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册