#47973 [Opn->Bgs]: stream_set_timeout no accept parameters smaller than 1 second

From: Date: Wed, 15 Apr 2009 16:50:44 +0000
Subject: #47973 [Opn->Bgs]: stream_set_timeout no accept parameters smaller than 1 second
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135845@lists.php.net to get a copy of this message
ID: 47973 User updated by: nyim at 163 dot com Reported By: nyim at 163 dot com -Status: Open +Status: Bogus Bug Type: Streams related Operating System: suse10 linux 32 bit PHP Version: 5.2.9 New Comment: forgive me, the third parameter is microsecond, no millisecond Previous Comments: ------------------------------------------------------------------------ [2009-04-15 16:11:51] nyim at 163 dot com Description: ------------ stream_set_timeout($udp, 0,300); just like stream_set_timeout($udp, 0); it ignore the third parameter strace the process: poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLERR}], 1, 0) = 1 Reproduce code: --------------- <?php $udp = stream_socket_client("udp://127.0.0.1:3434"); fwrite($udp,'xx'); stream_set_timeout($udp, 0,300); $time = microtime(true); fread($udp,1500); echo microtime(true) - $time; Expected result: ---------------- 0.30182409286499 Actual result: -------------- 3.3140182495117E-5 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47973&edit=1

« previous php.bugs (#135845) next »