mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 08:57:03 +03:00
Added: Configurable timeouts for IMAP, SMTP and SIEVE (#843)
This commit is contained in:
parent
c6f098bd2d
commit
55e3bad890
7 changed files with 17 additions and 3 deletions
|
|
@ -76,6 +76,11 @@ class Config
|
|||
*/
|
||||
public static $BoundaryPrefix = '_Part_';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $ImapTimeout = 300;
|
||||
|
||||
/**
|
||||
* @var \MailSo\Log\Logger|null
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class MailClient
|
|||
$this->oLogger = null;
|
||||
|
||||
$this->oImapClient = \MailSo\Imap\ImapClient::NewInstance();
|
||||
$this->oImapClient->SetTimeOuts(10, 300); // TODO
|
||||
$this->oImapClient->SetTimeOuts(10, \MailSo\Config::$ImapTimeout);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -165,8 +165,8 @@ abstract class NetClient
|
|||
*/
|
||||
public function SetTimeOuts($iConnectTimeOut = 10, $iSocketTimeOut = 10)
|
||||
{
|
||||
$this->iConnectTimeOut = $iConnectTimeOut;
|
||||
$this->iSocketTimeOut = $iSocketTimeOut;
|
||||
$this->iConnectTimeOut = 5 < $iConnectTimeOut ? $iConnectTimeOut : 5;
|
||||
$this->iSocketTimeOut = 5 < $iSocketTimeOut ? $iSocketTimeOut : 5;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue