Code

Made impa timeout settings configureable.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 20 Jul 2009 07:32:18 +0000 (07:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 20 Jul 2009 07:32:18 +0000 (07:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13938 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc

index 8816e39fb5a7657c2b39e98127006b04d3f3d337..6bfde61c709364bea1e9103c39ec6d025e9c2ca8 100644 (file)
@@ -57,7 +57,11 @@ class mailMethodCyrus extends mailMethod{
     /* 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 );
+    $timeout = $this->config->get_cfg_value("imapTimeout",10);
+    @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__,$timeout,
+          "<b>IMAP: Setting imap connect timeout to</b> (seconds)");
+    imap_timeout(1, $timeout);
+
     $this->imap_handle = @imap_open($cfg['connect'], $cfg['admin'], $cfg['password'], OP_HALFOPEN);
 
     /* Mailbox reachable? */