]> git.mxchange.org Git - hub.git/blobdiff - chat-server.php
No longer full CPU consumtion
[hub.git] / chat-server.php
index f228f9a0e6ad574926961b70b07b695509317b99..388d8039efcf1cc3562d285896ce92400c08fed4 100644 (file)
@@ -37,7 +37,7 @@ while (count($clients) > 0) {
 
        // get a list of all the clients that have data to be read from
        // if there are no clients with data, go to next iteration
-       $left = @socket_select($read, $write = null, $except = null, 0);
+       $left = @socket_select($read, $write = null, $except = null, 0, 150);
        if ($left < 1) {
                continue;
        }