summaryrefslogtreecommitdiffstats
path: root/do.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-04-16 17:28:08 -0700
committerPatrick Davison <snapwilliam@gmail.com>2013-04-16 17:28:08 -0700
commit08319bf6cc57dff43640957ba9e2daf857603c88 (patch)
tree68c0476711e8aeaadf80689d0bbeec1e4f2b6bed /do.php
parentfb03122e1c47f77a8a4d2eb985d1c1a5a9f2d4c0 (diff)
downloadpathery-08319bf6cc57dff43640957ba9e2daf857603c88.tar.xz
Fix for when sometimes rush-send fails?
Diffstat (limited to 'do.php')
-rw-r--r--do.php7
1 files 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.