mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-12 00:48:26 +01:00
try to catch an empty connection error object too, while trying to auto recover on errors; try to disconnect, when connect was successful, but no username for login is supplied
This commit is contained in:
parent
f444bb253d
commit
014775ab14
@ -535,6 +535,7 @@ class defaultimap extends Net_IMAP
|
|||||||
if(empty($username))
|
if(empty($username))
|
||||||
{
|
{
|
||||||
if ($this->debug) error_log(__METHOD__."No username supplied.".function_backtrace());
|
if ($this->debug) error_log(__METHOD__."No username supplied.".function_backtrace());
|
||||||
|
if ($this->_connected) $this->disconnect(); // disconnect (if connected)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if( PEAR::isError($status = parent::login($username, $password, 'LOGIN', !$this->isAdminConnection)) ) {
|
if( PEAR::isError($status = parent::login($username, $password, 'LOGIN', !$this->isAdminConnection)) ) {
|
||||||
|
@ -3391,7 +3391,7 @@ class felamimail_bo
|
|||||||
if (is_null($isError)) $isError =& egw_cache::getSession('email','icServerIMAP_connectionError');
|
if (is_null($isError)) $isError =& egw_cache::getSession('email','icServerIMAP_connectionError');
|
||||||
if ( isset($isError[$_icServerID]) || PEAR::isError($this->icServer->_connectionErrorObject))
|
if ( isset($isError[$_icServerID]) || PEAR::isError($this->icServer->_connectionErrorObject))
|
||||||
{
|
{
|
||||||
if (trim($isError[$_icServerID])==',')
|
if (trim($isError[$_icServerID])==',' || trim($this->icServer->_connectionErrorObject->message) == ',')
|
||||||
{
|
{
|
||||||
//error_log(__METHOD__.__LINE__.' Connection seemed to have failed in the past, no real reason given, try to recover on our own.');
|
//error_log(__METHOD__.__LINE__.' Connection seemed to have failed in the past, no real reason given, try to recover on our own.');
|
||||||
emailadmin_bo::unsetCachedObjects($_icServerID);
|
emailadmin_bo::unsetCachedObjects($_icServerID);
|
||||||
|
Loading…
Reference in New Issue
Block a user