forked from Silverfish/proton-bridge
Pause event loop only for non-UID FETCHes
This commit is contained in:
@ -451,11 +451,13 @@ func (im *imapMailbox) ListMessages(isUID bool, seqSet *imap.SeqSet, items []ima
|
|||||||
im.panicHandler.HandlePanic()
|
im.panicHandler.HandlePanic()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// EXPUNGE cannot be sent during listing and can come only from
|
if !isUID {
|
||||||
// the event loop, so we prevent any server side update to avoid
|
// EXPUNGE cannot be sent during listing and can come only from
|
||||||
// the problem.
|
// the event loop, so we prevent any server side update to avoid
|
||||||
im.user.pauseEventLoop()
|
// the problem.
|
||||||
defer im.user.unpauseEventLoop()
|
im.user.pauseEventLoop()
|
||||||
|
defer im.user.unpauseEventLoop()
|
||||||
|
}
|
||||||
|
|
||||||
var markAsReadIDs []string
|
var markAsReadIDs []string
|
||||||
markAsReadMutex := &sync.Mutex{}
|
markAsReadMutex := &sync.Mutex{}
|
||||||
|
|||||||
Reference in New Issue
Block a user