log both timeouts in update send

This commit is contained in:
Jakub
2020-09-03 09:59:44 +02:00
committed by Michal Horejsek
parent 7430c7f1f5
commit 60e1548685

View File

@ -129,6 +129,7 @@ func (store *Store) imapSendUpdate(update imapBackend.Update) {
select {
case store.imapUpdates <- update:
case <-time.After(1 * time.Second):
store.log.Warn("IMAP update could not be sent (timeout).")
}
}()
@ -136,7 +137,7 @@ func (store *Store) imapSendUpdate(update imapBackend.Update) {
select {
case <-done:
case <-time.After(1 * time.Second):
store.log.Error("Could not send IMAP update (timeout)")
store.log.Warn("IMAP update could not be delivered (timeout).")
return
}
}