Logout on read error
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 16 Oct 2009 09:21:54 +0000 (03:21 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 16 Oct 2009 09:21:54 +0000 (03:21 -0600)
framework/Imap_Client/lib/Horde/Imap/Client/Socket.php

index 0a5d947..a6d546b 100644 (file)
@@ -3476,6 +3476,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base
             if ($this->_debug) {
                 fwrite($this->_debug, "[ERROR: IMAP read/timeout error.]\n");
             }
+            $this->logout();
             throw new Horde_Imap_Client_Exception('IMAP read error or IMAP connection timed out.', Horde_Imap_Client_Exception::SERVER_READERROR);
         }