mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-27 21:31:30 +02:00
* email: apply timeout for connections for the waiting for data (while no response is comming in) as well
This commit is contained in:
parent
4d9308bd7e
commit
014c567e2d
@ -146,7 +146,7 @@ class Net_Socket extends PEAR {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->fp = $fp;
|
$this->fp = $fp;
|
||||||
|
$this->setTimeout($this->timeout, 0);
|
||||||
return $this->setBlocking($this->blocking);
|
return $this->setBlocking($this->blocking);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +273,6 @@ class Net_Socket extends PEAR {
|
|||||||
if (!is_resource($this->fp)) {
|
if (!is_resource($this->fp)) {
|
||||||
return $this->raiseError('not connected');
|
return $this->raiseError('not connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
return @fgets($this->fp, $size);
|
return @fgets($this->fp, $size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,7 +497,7 @@ class defaultimap extends Net_IMAP
|
|||||||
*
|
*
|
||||||
* @return resource the imap connection
|
* @return resource the imap connection
|
||||||
*/
|
*/
|
||||||
function openConnection($_adminConnection=false)
|
function openConnection($_adminConnection=false,$_timeout=20)
|
||||||
{
|
{
|
||||||
//error_log(__METHOD__.function_backtrace());
|
//error_log(__METHOD__.function_backtrace());
|
||||||
unset($this->_connectionErrorObject);
|
unset($this->_connectionErrorObject);
|
||||||
@ -515,7 +515,7 @@ class defaultimap extends Net_IMAP
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->setStreamContextOptions($this->_getTransportOptions());
|
$this->setStreamContextOptions($this->_getTransportOptions());
|
||||||
$this->setTimeout(20);
|
$this->setTimeout($_timeout);
|
||||||
if( PEAR::isError($status = parent::connect($this->_getTransportString(), $this->port, $this->encryption == 1)) ) {
|
if( PEAR::isError($status = parent::connect($this->_getTransportString(), $this->port, $this->encryption == 1)) ) {
|
||||||
if ($this->debug) error_log(__METHOD__."Could not connect with ".$this->_getTransportString()." on Port ".$this->port." Encryption==1?".$this->encryption);
|
if ($this->debug) error_log(__METHOD__."Could not connect with ".$this->_getTransportString()." on Port ".$this->port." Encryption==1?".$this->encryption);
|
||||||
if ($this->debug) error_log(__METHOD__."Status connect:".$status->message);
|
if ($this->debug) error_log(__METHOD__."Status connect:".$status->message);
|
||||||
|
@ -2968,7 +2968,6 @@
|
|||||||
//error_log(__METHOD__." using existing Connection ProfileID:".$_icServerID.' Status:'.print_r($this->icServer->_connected,true));
|
//error_log(__METHOD__." using existing Connection ProfileID:".$_icServerID.' Status:'.print_r($this->icServer->_connected,true));
|
||||||
} else {
|
} else {
|
||||||
//error_log( "-------------------------->open connection for Server with profileID:".$_icServerID.function_backtrace());
|
//error_log( "-------------------------->open connection for Server with profileID:".$_icServerID.function_backtrace());
|
||||||
$this->icServer->_timeout = 5;
|
|
||||||
$tretval = $this->icServer->openConnection($_adminConnection);
|
$tretval = $this->icServer->openConnection($_adminConnection);
|
||||||
if ( PEAR::isError($tretval) || $tretval===false)
|
if ( PEAR::isError($tretval) || $tretval===false)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user