From 08319bf6cc57dff43640957ba9e2daf857603c88 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 16 Apr 2013 17:28:08 -0700 Subject: Fix for when sometimes rush-send fails? --- do.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/do.php b/do.php index 04bed0a..1e2760f 100644 --- a/do.php +++ b/do.php @@ -130,6 +130,7 @@ if ($_GET['r'] == 'getpath') { if (!is_int($mapID)) return; //$firephp->log($mapID, "mapID"); + //TODO: Get rid of this hackyness: //the first 10 ID's reserved for challenges & tutorial. if ($mapID > 10) $mapcode = getMapCode($mapID); @@ -207,6 +208,7 @@ if ($_GET['r'] == 'getpath') { header("Connection: close"); header("Content-Length: " . mb_strlen($encoded)); echo $encoded; + ob_end_flush(); flush(); //The connection is now closed, no further communication to the client can be done! } @@ -253,7 +255,7 @@ if ($_GET['r'] == 'getpath') { //if ($accepted == false) die(json_encode($json)); //TODO: Where's $paths coming from? getCompletedChallenges($userID, $mapID, $solution, $moves, $paths); - die(json_encode($json)); + //die(json_encode($json)); } @@ -332,10 +334,11 @@ if ($_GET['r'] == 'getpath') { // --------- END } +//!! Never printed.. $json['error'][] = 'Rush-send failed'; //$encoded = json_encode($json); -die(json_encode($json)); +//die(json_encode($json)); //Very simple, confirm that all targets are reachable. -- cgit v1.2.3