Skip to content

Commit

Permalink
Tweak error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Mar 19, 2014
1 parent 90745a0 commit 8ddc751
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions framework/Imap_Client/lib/Horde/Imap/Client/Socket.php
Expand Up @@ -3938,16 +3938,16 @@ protected function _sendCmdChunk($pipeline, $chunk)
} catch (Horde_Imap_Client_Exception $e) {
switch ($e->getCode()) {
case $e::DISCONNECT:
/* Guaranteed to have no more data incoming, so we can
* immediately logout. */
$this->_temp['logout'] = true;
// Fall-through

case $e::SERVER_READERROR:
$this->logout();
throw $e;
}

// Catch and store exception; don't throw until all input
// is read. (For now, only store first exception.)
/* For all other issues, catch and store exception; don't
* throw until all input is read since we need to clear
* incoming queue. (For now, only store first exception.) */
if (is_null($exception)) {
$exception = $e;
}
Expand Down

0 comments on commit 8ddc751

Please sign in to comment.