Sleep a bit to prevent being too fast
[gamestick-pjgsapi.git] / www / api / rest / connect.php
index ba45c8a0153f6733728bb2dcbfba74455217cc6c..783684f3c5610f254776d013e8dd833943f9b122 100644 (file)
@@ -3,8 +3,6 @@
  * Generate the apps list + other information available at
  * http://l2.gamestickservices.net/api/rest/connect/stick/stick/xxx/view.json
  */
-#readfile(dirname(__FILE__, 4) . '/alex.json');die();
-
 header('HTTP/1.0 500 Internal Server Error');
 
 $rootDir = dirname(__FILE__, 4);
@@ -117,6 +115,8 @@ foreach ($placeholderFiles as $placeholder => $cacheFile) {
     );
 }
 
+sleep(2);//prevent error "Failed to duplicate connect data for console"
+
 header('HTTP/1.0 200 OK');
 header('Content-Type: application/json');
 echo $json . "\n";