mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-27 17:18:33 +00:00
Be more graceful when handling IMAP problems.
This commit is contained in:
parent
a31efb7fbe
commit
39071d28e8
@ -566,6 +566,7 @@ void *imap_thread(void *arg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
fail++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
recvbuf[numbytes] = '\0';
|
recvbuf[numbytes] = '\0';
|
||||||
@ -643,12 +644,16 @@ void *imap_thread(void *arg)
|
|||||||
// need to re-connect
|
// need to re-connect
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
fail++;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
imap_unseen_command(mail, old_unseen, old_messages);
|
imap_unseen_command(mail, old_unseen, old_messages);
|
||||||
fail = 0;
|
fail = 0;
|
||||||
old_unseen = mail->unseen;
|
old_unseen = mail->unseen;
|
||||||
old_messages = mail->messages;
|
old_messages = mail->messages;
|
||||||
}
|
}
|
||||||
|
if (fail) break;
|
||||||
} else {
|
} else {
|
||||||
strncpy(sendbuf, "a3 logout\r\n", MAXDATASIZE);
|
strncpy(sendbuf, "a3 logout\r\n", MAXDATASIZE);
|
||||||
if (send(sockfd, sendbuf, strlen(sendbuf), 0) == -1) {
|
if (send(sockfd, sendbuf, strlen(sendbuf), 0) == -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user