From c5fcc5c6f1284ab3b3b39fbed2f220ace2d68c4e Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Fri, 26 Sep 2008 21:29:02 +0000 Subject: [PATCH] handle BYE from server when idling (IMAP stuff) git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1261 7f574dfc-610e-0410-a909-a81674777703 --- src/conky.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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;