Code

Closes #310 Moved copy_FAI_resource_recursive to faiManagement. It is only used there.
[gosa.git] / gosa-core / include / class_socketClient.inc
index 2e2033b6c6607703fc8ab84b12528b9ebdc35ee0..0ed42a5fa3fda35febbf76d423f71a1e342b5f34 100644 (file)
@@ -114,15 +114,17 @@ class Socket_Client
                if($this->handle){
 
                        /* Check if there is something to read for us */
-                       $read = array("0"=>$this->handle);      
-                       $num = @stream_select($read,$write=NULL,$accept=NULL,$this->timeout);
+                       $read = array("0"=>$this->handle);
+                       $write = array();
+                       $accept = array();      
+                       $num = @stream_select($read,$write,$accept,floor($this->timeout), ceil($this->timeout*1000000));
                        $str = "";              
                
                        /* Read data if necessary */
                        while($num && $this->b_data_send){
                                $str.= fread($this->handle, 1024000);
                                $read = array("0"=>$this->handle);      
-                               $num = @stream_select($read,$write=NULL,$accept=NULL,$this->timeout);
+                               $num = @stream_select($read,$write,$accept,floor($this->timeout), ceil($this->timeout*1000000));
                        }
                        $this->bytes_read = strlen($str);
                        $this->b_data_send = FALSE;
@@ -147,8 +149,5 @@ class Socket_Client
                /* Terminate decryption handle and close module */
                mcrypt_generic_deinit($this->td);
        }
-
 }
-
-
 ?>