handle BYE from server when idling (IMAP stuff)
authorBrenden Matthews <brenden1@rty.ca>
Fri, 26 Sep 2008 21:29:02 +0000 (21:29 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Fri, 26 Sep 2008 21:29:02 +0000 (21:29 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1261 7f574dfc-610e-0410-a909-a81674777703

src/conky.c

index 633a884..3081b2b 100644 (file)
@@ -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;