From: hickert Date: Mon, 20 Nov 2006 05:41:57 +0000 (+0000) Subject: Set imap_open timeout to 10 seconds. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6edb16cff16d4b239fca56740f6f299d1a95a1c4;p=gosa.git Set imap_open timeout to 10 seconds. If the timeout is not defined in the php script, php.ini will set the timeout to 60 seconds. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5157 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_mail-methods-cyrus.inc b/include/class_mail-methods-cyrus.inc index 18e55fa6d..8fecaa217 100644 --- a/include/class_mail-methods-cyrus.inc +++ b/include/class_mail-methods-cyrus.inc @@ -46,6 +46,11 @@ var $uattrib= "uid"; if(!isset($cfg['admin'])) $cfg['admin']=""; if(!isset($cfg['password'])) $cfg['password']=""; + /* Setting connect timeout to 10 seconds, + else the GOsa UI may freeze for 60 seconds. + (PHP default is 'default_socket_timeout = 60') */ + imap_timeout(1, 10 ); + $this->mbox = @imap_open($cfg['connect'], $cfg['admin'], $cfg['password'], OP_HALFOPEN); /* Mailbox reachable? */