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)
|
"cursor", nextCursor)
|
||||||
|
|
||||||
// Publish
|
// Publish
|
||||||
|
batchLoop:
|
||||||
for _, batch := range batches {
|
for _, batch := range batches {
|
||||||
select {
|
select {
|
||||||
case output <- batch:
|
case output <- batch:
|
||||||
|
@ -722,11 +723,11 @@ func (s *WMailServer) processRequestInBundles(
|
||||||
case <-cancel:
|
case <-cancel:
|
||||||
log.Info("[mailserver:processRequestInBundles] failed to push all batches",
|
log.Info("[mailserver:processRequestInBundles] failed to push all batches",
|
||||||
"requestID", requestID)
|
"requestID", requestID)
|
||||||
break
|
break batchLoop
|
||||||
case <-time.After(timeout):
|
case <-time.After(timeout):
|
||||||
log.Error("[mailserver:processRequestInBundles] timed out pushing a batch",
|
log.Error("[mailserver:processRequestInBundles] timed out pushing a batch",
|
||||||
"requestID", requestID)
|
"requestID", requestID)
|
||||||
break
|
break batchLoop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue