feat(GODT-2803): Gluon IMAP State access

Update to latest Gluon to allow access to the database for bridge. The
cache is placed in a `SharedCache` type to ensure that we respect calls
to `Connector.Close`.

In theory, this should never trigger an error, but this way we can catch
it if it happens.

https://github.com/ProtonMail/gluon/pull/391
This commit is contained in:
Leander Beernaert
2023-08-11 09:37:56 +02:00
parent 24331f9715
commit 41c125f65e
8 changed files with 197 additions and 12 deletions

View File

@ -116,6 +116,7 @@ func (s *Service) Unsubscribe(subscription EventSubscriber) {
// Pause pauses the event polling.
func (s *Service) Pause() {
s.log.Info("Pausing")
atomic.StoreUint32(&s.paused, 1)
}
@ -142,6 +143,7 @@ func (s *Service) PauseWithWaiter() *EventPollWaiter {
// Resume resumes the event polling.
func (s *Service) Resume() {
s.log.Info("Resuming")
atomic.StoreUint32(&s.paused, 0)
}