note 79512 added to function.socket-select
| From: | qartis at gmail dot com | Date: | Fri, 30 Nov 2007 21:38:29 +0000 |
| Subject: | note 79512 added to function.socket-select | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132704@lists.php.net to get a copy of this message | ||
In regards to the code posted by vardhan ( at ) rogers ( dot ) com, it appears that on the following
line:
if (socket_select($read, $write = NULL, $except = NULL, 0) < 1)
the timeout parameter is accidentally set to 0, rather than NULL. This means that the select call
will return immediately rather than blocking indefinitely.
Change the socket_select line to the following for great success:
if (socket_select($read, $write = NULL, $except = NULL, NULL) < 1)
----
Server IP: 64.71.164.2
Probable Submitter: 64.34.243.165
----
Manual Page -- http://www.php.net/manual/en/function.socket-select.php
Edit -- https://master.php.net/note/edit/79512
Del: integrated -- https://master.php.net/note/delete/79512/integrated
Del: useless -- https://master.php.net/note/delete/79512/useless
Del: bad code -- https://master.php.net/note/delete/79512/bad+code
Del: spam -- https://master.php.net/note/delete/79512/spam
Del: non-english -- https://master.php.net/note/delete/79512/non-english
Del: in docs -- https://master.php.net/note/delete/79512/in+docs
Del: other reasons-- https://master.php.net/note/delete/79512
Reject -- https://master.php.net/note/reject/79512
Search -- https://master.php.net/manage/user-notes.php