summaryrefslogtreecommitdiff
path: root/src/jwebmail/read_mails.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/jwebmail/read_mails.py')
-rw-r--r--src/jwebmail/read_mails.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jwebmail/read_mails.py b/src/jwebmail/read_mails.py
index f88ce46..e43e7c3 100644
--- a/src/jwebmail/read_mails.py
+++ b/src/jwebmail/read_mails.py
@@ -175,13 +175,15 @@ def _build_qma(domain):
def login(username, password):
_, domain = username.split("@")
try:
- _build_qma(domain).open(username, password)
+ qma = _build_qma(domain).open(username, password)
except QMAuthError as err:
if err.rc == 1:
return False
else:
raise
+ qma.close()
+
r = _select_timeout_session()
r.set(username, password)
r.close()