1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

When we have a failure in mail thread, sleep for a bit.

This commit is contained in:
Brenden Matthews 2010-09-09 10:53:39 -07:00
parent d0a20850c8
commit 2f9195bd56

View File

@ -675,6 +675,7 @@ static void imap_thread(thread_handle &handle, struct mail_s *mail)
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));
@ -1020,6 +1021,7 @@ static void pop3_thread(thread_handle &handle, struct mail_s *mail)
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));