added name to batch loop so break works properly (#1650)
This commit is contained in:
parent
a4a7ae21b5
commit
457acec72e
|
@ -712,6 +712,7 @@ func (s *WMailServer) processRequestInBundles(
|
|||
"cursor", nextCursor)
|
||||
|
||||
// Publish
|
||||
batchLoop:
|
||||
for _, batch := range batches {
|
||||
select {
|
||||
case output <- batch:
|
||||
|
@ -722,11 +723,11 @@ func (s *WMailServer) processRequestInBundles(
|
|||
case <-cancel:
|
||||
log.Info("[mailserver:processRequestInBundles] failed to push all batches",
|
||||
"requestID", requestID)
|
||||
break
|
||||
break batchLoop
|
||||
case <-time.After(timeout):
|
||||
log.Error("[mailserver:processRequestInBundles] timed out pushing a batch",
|
||||
"requestID", requestID)
|
||||
break
|
||||
break batchLoop
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue