fix_: wait for mailserver available signal to change missing messages criteria (#5686)
This commit is contained in:
parent
c02ebf957c
commit
4aa51f9882
|
@ -396,11 +396,17 @@ func (m *Messenger) checkForMissingMessagesLoop() {
|
|||
t := time.NewTicker(missingMessageCheckPeriod)
|
||||
defer t.Stop()
|
||||
|
||||
mailserverAvailableSignal := m.SubscribeMailserverAvailable()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-m.quit:
|
||||
return
|
||||
|
||||
// Wait for mailserver available, also triggered on mailserver change
|
||||
case <-mailserverAvailableSignal:
|
||||
mailserverAvailableSignal = m.SubscribeMailserverAvailable()
|
||||
|
||||
case <-t.C:
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue