blob: fdb9f371c1f39f3017630b4681da2fe0ce1435b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
diff --git a/ayatanawebmail/idler.py b/ayatanawebmail/idler.py
index 8f956ea..b6b63b4 100755
--- a/ayatanawebmail/idler.py
+++ b/ayatanawebmail/idler.py
@@ -22,6 +22,12 @@ class Idler(object):
def stop(self):
+ if self.oConnection.oImap is not None:
+ try:
+ # Send a NOOP command to interrupt the IDLE mode and free the blocked thread
+ self.oConnection.oImap.noop()
+ except:
+ pass
self.oEvent.set()
def join(self):
|