10 seconds is too short for certain tasks, such as searching a large
mailbox.
Add a bit more thorough error message.
* statuscache - (boolean) Cache STATUS responses?
* DEFAULT: False
* timeout - (integer) Connection timeout, in seconds.
- * DEFAULT: 10 seconds
+ * DEFAULT: 30 seconds
*
* Copyright 2008-2009 The Horde Project (http://www.horde.org/)
*
}
if (empty($params['timeout'])) {
- $params['timeout'] = 10;
+ $params['timeout'] = 30;
}
if (empty($params['cache'])) {
if (!strlen($data)) {
if ($this->_debug) {
- fwrite($this->_debug, '[ERROR: IMAP read error.]' . "\n");
+ fwrite($this->_debug, '[ERROR: IMAP read/timeout error.]' . "\n");
}
- throw new Horde_Imap_Client_Exception('IMAP read error.', Horde_Imap_Client_Exception::SERVER_READERROR);
+ throw new Horde_Imap_Client_Exception('IMAP read error or IMAP connection timed out.', Horde_Imap_Client_Exception::SERVER_READERROR);
}
if ($this->_debug) {