objsvc: Allow to send search response in multiple messages #1586
1 changed files with 2 additions and 2 deletions
|
@ -162,13 +162,13 @@ func (s *searchStreamMsgSizeCtrl) Send(resp *object.SearchResponse) error {
|
|||
|
||||
var newResp *object.SearchResponse
|
||||
|
||||
for ln := uint64(len(ids)); ; {
|
||||
for {
|
||||
if newResp == nil {
|
||||
newResp = new(object.SearchResponse)
|
||||
newResp.SetBody(body)
|
||||
}
|
||||
|
||||
cut := min(s.addrAmount, ln)
|
||||
cut := min(s.addrAmount, uint64(len(ids)))
|
||||
|
||||
body.SetIDList(ids[:cut])
|
||||
newResp.SetMetaHeader(resp.GetMetaHeader())
|
||||
|
|
Loading…
Add table
Reference in a new issue