From 5ffe5207843974ff6a4f9801e9a894bf6dbcbb0c Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 14 Jan 2008 09:32:40 +0000 Subject: [PATCH] Updated socket client to support float timeouts. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8318 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_socketClient.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.30.2