From d9343f65d319615fe59e2b0a49d90348a0541496 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Sat, 18 Jan 2020 16:18:19 -0400 Subject: Trigger an update of a O365 mailbox if the notification FD closes Fixes an issue where mailbox changes could be missed. Signed-off-by: Jason Gunthorpe --- cloud_mdir_sync/office365.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloud_mdir_sync/office365.py b/cloud_mdir_sync/office365.py index 0afaa3f..bf8ccf1 100644 --- a/cloud_mdir_sync/office365.py +++ b/cloud_mdir_sync/office365.py @@ -502,6 +502,8 @@ class O365Mailbox(mailbox.Mailbox): r = None while True: if r is None: + self.need_update = True + self.changed_event.set() r = await self.graph.owa_subscribe( f"https://outlook.office.com/api/beta/me/mailfolders('{self.mailbox_id}')/Messages", "Created,Updated,Deleted") -- cgit v1.2.3