[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [flashproxy/master] Unconditionally rate-limit and reconnect after imap_loop.
commit f612910c4bd3c5c845248ff44d405f9b92be078f
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Sat May 4 22:33:52 2013 -0700
Unconditionally rate-limit and reconnect after imap_loop.
Previously we did this only on an exception, but the only way imap_loop
can finish is by an exception.
---
facilitator/facilitator-email-poller | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/facilitator/facilitator-email-poller b/facilitator/facilitator-email-poller
index c90fa66..2e240e0 100755
--- a/facilitator/facilitator-email-poller
+++ b/facilitator/facilitator-email-poller
@@ -330,13 +330,12 @@ while True:
except imaplib.IMAP4.abort, e:
# Try again after a disconnection.
log(u"lost server connection: %s" % str(e))
- # Don't reconnect too fast.
- t = login_limit.time_to_wait()
- if t > 0:
- log(u"waiting %.2f seconds before logging in again" % t)
- time.sleep(t)
- else:
- break
+
+ # Don't reconnect too fast.
+ t = login_limit.time_to_wait()
+ if t > 0:
+ log(u"waiting %.2f seconds before logging in again" % t)
+ time.sleep(t)
log(u"closing")
imap.close()
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits