Added check for IDLE in capabilities
This commit is contained in:
parent
8cd2bdf7f5
commit
17ec4df02a
@ -401,8 +401,8 @@ class IdleThread(object):
|
|||||||
|
|
||||||
def noop(self):
|
def noop(self):
|
||||||
imapobj = self.parent.acquireconnection()
|
imapobj = self.parent.acquireconnection()
|
||||||
self.event.wait()
|
|
||||||
imapobj.noop()
|
imapobj.noop()
|
||||||
|
self.event.wait()
|
||||||
self.parent.releaseconnection(imapobj)
|
self.parent.releaseconnection(imapobj)
|
||||||
|
|
||||||
def dosync(self):
|
def dosync(self):
|
||||||
@ -429,7 +429,10 @@ class IdleThread(object):
|
|||||||
self.needsync = True
|
self.needsync = True
|
||||||
self.event.set()
|
self.event.set()
|
||||||
imapobj = self.parent.acquireconnection()
|
imapobj = self.parent.acquireconnection()
|
||||||
imapobj.idle(callback=callback)
|
if "IDLE" in imapobj.capabilities:
|
||||||
|
imapobj.idle(callback=callback)
|
||||||
|
else:
|
||||||
|
imapobj.noop()
|
||||||
self.event.wait()
|
self.event.wait()
|
||||||
if self.event.isSet():
|
if self.event.isSet():
|
||||||
imapobj.noop()
|
imapobj.noop()
|
||||||
|
Loading…
Reference in New Issue
Block a user