summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-05-07 15:19:26 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-05-07 15:19:26 +0200
commit481f4112ac743b102f52b55ca9b50d62d6cafbe6 (patch)
treee423554d4636f46bfe239ef7a6398d6c6ad76a5d
parentfeaaf5b27be3493f90ba3d9627f7b63c79f87bc9 (diff)
downloadpykolab-481f4112ac743b102f52b55ca9b50d62d6cafbe6.tar.gz
Make sure .disconnect() is issued in order to prevent connections stacking up
-rw-r--r--wallace/module_resources.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/wallace/module_resources.py b/wallace/module_resources.py
index 3bc62fc..cd92e3c 100644
--- a/wallace/module_resources.py
+++ b/wallace/module_resources.py
@@ -436,6 +436,9 @@ def execute(*args, **kw):
send_response(original_resource['mail'], itip_event)
+ auth.disconnect()
+ del auth
+
# Disconnect IMAP or we lock the mailbox almost constantly
imap.disconnect()
del imap
@@ -589,6 +592,8 @@ def resource_record_from_email_address(email_address):
resource_records = [ resource_records ]
+ auth.disconnect()
+
return resource_records
def resource_records_from_itip_events(itip_events):
@@ -722,6 +727,8 @@ def resource_records_from_itip_events(itip_events):
level=8
)
+ auth.disconnect()
+
return resource_records
def send_response(from_address, itip_events):