xbox: allow requests to fail for "who-is-on"

 - xboxapi service has new hidden rate limit
parent f60df863
......@@ -60,7 +60,7 @@ class Client extends XboxAPI
]);
}
$results = GuzzlePromise\Unwrap($requests);
$results = GuzzlePromise\settle($requests)->wait();
return $results;
}
......@@ -102,7 +102,10 @@ class Client extends XboxAPI
$found = false;
foreach ($presence as $seo => $response) {
$data = json_decode($response->getBody(), true);
if ($response['state'] === 'rejected') {
continue;
}
$data = json_decode($response['value']->getBody(), true);
if (isset($data['state']) && $data['state'] == 'Online') {
foreach ($data['devices'] as $device) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment