Commit 5590a3e9 authored by Colomban Wendling's avatar Colomban Wendling

Don't report a task done when reaching timeout

This fixes crashing the mail thread when there the queue is empty after
config.emails.smtp_keepalive_timeout seconds.
parent 3124a204
......@@ -55,6 +55,7 @@ class ThreadedSMTP(object):
except Exception as e:
print("Couldn't send email: %s" % str(e), file=stderr)
finally:
if server: # server is None on exception queue.Empty
self._queue.task_done()
self.__server_quit(server)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment