Skip to content

Commit

Permalink
Reverting change that apparently broke querying for slower servers. I…
Browse files Browse the repository at this point in the history
…f it ain't broke don't fix it! Release version 3.0.13 to fix. Refs #411 & #416
  • Loading branch information
Austinb committed Jan 28, 2018
1 parent 31c033c commit ab02923
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "austinb/gameq",
"description": "GameQ Gameserver Library",
"keywords": ["gameq","serverstatus"],
"version": "v3.0.12",
"version": "v3.0.13",
"license": "LGPL-3.0+",
"authors": [
{
Expand Down
9 changes: 2 additions & 7 deletions src/GameQ/Query/Native.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ public function getResponses(array $sockets, $timeout, $stream_timeout)
// Now lets listen for some streams, but do not cross the streams!
$streams = stream_select($read, $write, $except, 0, $stream_timeout);

// We had error, kill the loop
if ($streams === false) {
// We had error or no streams left, kill the loop
if ($streams === false || ($streams <= 0)) {
break;
}

Expand All @@ -208,11 +208,6 @@ public function getResponses(array $sockets, $timeout, $stream_timeout)
$responses[(int)$socket][] = $response;
}

// If we have data from all sockets, break
if (count($responses) == count($sockets)) {
break;
}

// Because stream_select modifies read we need to reset it each time to the original array of sockets
$read = $sockets_tmp;
}
Expand Down

0 comments on commit ab02923

Please sign in to comment.