diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-04-16 17:28:08 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-04-16 17:28:08 -0700 |
commit | 08319bf6cc57dff43640957ba9e2daf857603c88 (patch) | |
tree | 68c0476711e8aeaadf80689d0bbeec1e4f2b6bed | |
parent | fb03122e1c47f77a8a4d2eb985d1c1a5a9f2d4c0 (diff) | |
download | pathery-08319bf6cc57dff43640957ba9e2daf857603c88.tar.xz |
Fix for when sometimes rush-send fails?
-rw-r--r-- | do.php | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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.
|