diff --git a/src/conky.c b/src/conky.c index 633a884e..3081b2b7 100644 --- a/src/conky.c +++ b/src/conky.c @@ -1921,6 +1921,14 @@ void *imap_thread(void *arg) break; } } + /* + * check if we got a BYE from server + */ + buf = recvbuf; + if (buf && strstr(buf, "* BYE")) { + // need to re-connect + break; + } } imap_unseen_command(mail, old_unseen, old_messages); fail = 0;