diff --git a/countBattles.txt b/countBattles.txt index 377ce3c..c7f4ad9 100755 --- a/countBattles.txt +++ b/countBattles.txt @@ -1 +1 @@ -1660 \ No newline at end of file +1662 \ No newline at end of file diff --git a/src/arenas/tron/TronGame.php b/src/arenas/tron/TronGame.php index afd17d2..c2a1792 100755 --- a/src/arenas/tron/TronGame.php +++ b/src/arenas/tron/TronGame.php @@ -181,22 +181,13 @@ class TronGame ); curl_multi_add_handle($cmh,$ch[$i]); } + //send the requests do { $returnVal = curl_multi_exec($cmh, $runningHandles); - } while ($returnVal == CURLM_CALL_MULTI_PERFORM); - // Loop and continue processing the request - while ($runningHandles && $returnVal== CURLM_OK) { - // Wait forever for network - $numberReady = curl_multi_select($cmh); - if ($numberReady != -1) { - // Pull in any new data, or at least handle timeouts - do { - $returnVal = curl_multi_exec($cmh, $runningHandles); - } while ($returnVal == CURLM_CALL_MULTI_PERFORM); - } - } - + }while($runningHandles > 0); + + //Get results for ($i = 0; $i < count($iasUrls); $i++){ // Check for errors diff --git a/src/arenas/tron/js.js b/src/arenas/tron/js.js index 5e44b37..919cf38 100755 --- a/src/arenas/tron/js.js +++ b/src/arenas/tron/js.js @@ -105,13 +105,10 @@ function play(gameId,xd_check){ drawMap(reponse['lap']); if(reponse['continue'] == '1'){ - setTimeout(function(){ + //setTimeout(function(){ play(gameId,xd_check); - } ,500); - - - - + //} ,500); + }else{ alert ('game ended'); }