defer s.mutex.Unlock()
var closed []WhatsAppBatch
+
for _, batch := range s.file.Batches {
if batch.Closed {
closed = append(closed, batch)
defer s.mutex.Unlock()
var first time.Time
+
for _, batch := range s.file.Batches {
deadline := s.deadline(batch)
if !batch.Closed && (first.IsZero() || deadline.Before(first)) {