mail-api
mail-api copied to clipboard
EventQueue should be terminated only by its owner
Both Service.notifyConnectionListeners and Folder.notifyConnectionListeners are calling EventQueue.terminateQueue() if type is ConnectionEvent.CLOSED . However, if mail.event.scope is set to 'application' or 'session' this can cause to some later events to be lost without being processed.
This problem should be fixed to allow queue termination only when object that is processing event owns EventQueue.
Thanks for creating this issue. I'm going to use this to write myself a reminder that there are multiple tickets to be created and prioritized around EventQueue.