From 6edb16cff16d4b239fca56740f6f299d1a95a1c4 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 20 Nov 2006 05:41:57 +0000 Subject: [PATCH] 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 --- include/class_mail-methods-cyrus.inc | 5 +++++ 1 file changed, 5 insertions(+) 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? */ -- 2.30.2