Code

Updated socket client to support float timeouts.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Jan 2008 09:32:40 +0000 (09:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Jan 2008 09:32:40 +0000 (09:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8318 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_socketClient.inc

index e79ae893d0dbf91eae655c129eeea3c0c060f6a6..73a0da5f68e22948d9ea9b2f65491b35518f603b 100644 (file)
@@ -117,14 +117,14 @@ class Socket_Client
                        $read = array("0"=>$this->handle);
                        $write = array();
                        $accept = array();      
-                       $num = @stream_select($read,$write,$accept,$this->timeout);
+                       $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,$accept,$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;