projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cf4f302
)
When we have a failure in mail thread, sleep for a bit.
author
Brenden Matthews
<brenden@diddyinc.com>
Thu, 9 Sep 2010 17:53:39 +0000
(10:53 -0700)
committer
Brenden Matthews
<brenden@diddyinc.com>
Thu, 9 Sep 2010 17:53:39 +0000
(10:53 -0700)
src/mail.c
patch
|
blob
|
history
diff --git
a/src/mail.c
b/src/mail.c
index
1319644
..
531e943
100644
(file)
--- a/
src/mail.c
+++ b/
src/mail.c
@@
-676,6
+676,7
@@
static void *imap_thread(void *arg)
NORM_ERR("Trying IMAP connection again for %s@%s (try %u/%u)",
mail->user, mail->host, fail + 1, mail->retries);
resolved_host = 0; /* force us to resolve the hostname again */
NORM_ERR("Trying IMAP connection again for %s@%s (try %u/%u)",
mail->user, mail->host, fail + 1, mail->retries);
resolved_host = 0; /* force us to resolve the hostname again */
+ sleep(fail); /* sleep more for the more failures we have */
}
if (!resolved_host) {
memset(&hints, 0, sizeof(struct addrinfo));
}
if (!resolved_host) {
memset(&hints, 0, sizeof(struct addrinfo));
@@
-1024,6
+1025,7
@@
static void *pop3_thread(void *arg)
NORM_ERR("Trying POP3 connection again for %s@%s (try %u/%u)",
mail->user, mail->host, fail + 1, mail->retries);
resolved_host = 0; /* force us to resolve the hostname again */
NORM_ERR("Trying POP3 connection again for %s@%s (try %u/%u)",
mail->user, mail->host, fail + 1, mail->retries);
resolved_host = 0; /* force us to resolve the hostname again */
+ sleep(fail); /* sleep more for the more failures we have */
}
if (!resolved_host) {
memset(&hints, 0, sizeof(struct addrinfo));
}
if (!resolved_host) {
memset(&hints, 0, sizeof(struct addrinfo));