From: hickert Date: Mon, 14 Jan 2008 09:32:40 +0000 (+0000) Subject: Updated socket client to support float timeouts. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5ffe5207843974ff6a4f9801e9a894bf6dbcbb0c;p=gosa.git Updated socket client to support float timeouts. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8318 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_socketClient.inc b/gosa-core/include/class_socketClient.inc index e79ae893d..73a0da5f6 100644 --- a/gosa-core/include/class_socketClient.inc +++ b/gosa-core/include/class_socketClient.inc @@ -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;