Skip to content

Commit 4aa51f9

Browse files
fix_: wait for mailserver available signal to change missing messages criteria (#5686)
1 parent c02ebf9 commit 4aa51f9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

protocol/messenger_mailserver.go

+6
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,17 @@ func (m *Messenger) checkForMissingMessagesLoop() {
396396
t := time.NewTicker(missingMessageCheckPeriod)
397397
defer t.Stop()
398398

399+
mailserverAvailableSignal := m.SubscribeMailserverAvailable()
400+
399401
for {
400402
select {
401403
case <-m.quit:
402404
return
403405

406+
// Wait for mailserver available, also triggered on mailserver change
407+
case <-mailserverAvailableSignal:
408+
mailserverAvailableSignal = m.SubscribeMailserverAvailable()
409+
404410
case <-t.C:
405411

406412
}

0 commit comments

Comments
 (0)