1
0
Fork 0

Fix socket timeout

pull/183/head
Felix Becker 2016-11-28 19:22:08 +01:00
parent d698cf8238
commit f09ebab6ed
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ if (!empty($options['tcp'])) {
if (!extension_loaded('pcntl')) { if (!extension_loaded('pcntl')) {
fwrite(STDERR, 'PCNTL is not available. Only a single connection will be accepted'); fwrite(STDERR, 'PCNTL is not available. Only a single connection will be accepted');
} }
while ($socket = stream_socket_accept($tcpServer)) { while ($socket = stream_socket_accept($tcpServer, -1)) {
stream_set_blocking($socket, false); stream_set_blocking($socket, false);
if (extension_loaded('pcntl')) { if (extension_loaded('pcntl')) {
// If PCNTL is available, fork a child process for the connection // If PCNTL is available, fork a child process for the connection