forked from Silverfish/proton-bridge
fix(GODT-2803): Separate conditions to pause event loop for IMAP
Add two separate toggles to control event loop pausing. This is required to prevent cases where the bridge requests the event loop to be paused but a sync process completes and resumes the event loop. For the loop to resume now both states need to be set to false. This will be removed once GODT-2848 is implemented.
This commit is contained in:
@ -38,7 +38,8 @@ import (
|
||||
|
||||
type EventProvider interface {
|
||||
userevents.Subscribable
|
||||
userevents.EventController
|
||||
PauseIMAP()
|
||||
ResumeIMAP()
|
||||
}
|
||||
|
||||
type Telemetry interface {
|
||||
@ -362,7 +363,7 @@ func (s *Service) run(ctx context.Context) { //nolint gocyclo
|
||||
}
|
||||
|
||||
s.log.Info("Sync complete, starting API event stream")
|
||||
s.eventProvider.Resume()
|
||||
s.eventProvider.ResumeIMAP()
|
||||
}
|
||||
|
||||
case update, ok := <-s.syncHandler.updater.ch:
|
||||
|
||||
Reference in New Issue
Block a user