Code

Set imap_open timeout to 10 seconds.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 20 Nov 2006 05:41:57 +0000 (05:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 20 Nov 2006 05:41:57 +0000 (05:41 +0000)
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

index 18e55fa6d2810d93dba2bdddaa582aa711c49b60..8fecaa217ab5bf0400083b7dd5b0444bc23e9a79 100644 (file)
@@ -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? */