reduce the wait to 2/10ths instead of a whole second

This commit is contained in:
Isaac Connor 2015-06-05 11:49:05 -04:00
parent c8e41319e6
commit e10fdaf344
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ switch ( $_REQUEST['command'] )
$remSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'s.sock'; $remSockFile = ZM_PATH_SOCKS.'/zms-'.sprintf("%06d",$_REQUEST['connkey']).'s.sock';
$max_socket_tries = 10; $max_socket_tries = 10;
while ( !file_exists($remSockFile) && $max_socket_tries-- ) //sometimes we are too fast for our own good, if it hasn't been setup yet give it a second. while ( !file_exists($remSockFile) && $max_socket_tries-- ) //sometimes we are too fast for our own good, if it hasn't been setup yet give it a second.
sleep(1); usleep(200000);
if ( !@socket_sendto( $socket, $msg, strlen($msg), 0, $remSockFile ) ) if ( !@socket_sendto( $socket, $msg, strlen($msg), 0, $remSockFile ) )
{ {