mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-18 06:31:05 +00:00
Display an error if attempting to close another session's app rather than silently failing
This commit is contained in:
@@ -417,6 +417,17 @@ static NSMutableSet* hostList;
|
|||||||
// Exempt this host from discovery while handling the quit operation
|
// Exempt this host from discovery while handling the quit operation
|
||||||
[_discMan removeHostFromDiscovery:app.host];
|
[_discMan removeHostFromDiscovery:app.host];
|
||||||
[hMan executeRequestSynchronously:quitRequest];
|
[hMan executeRequestSynchronously:quitRequest];
|
||||||
|
if (quitResponse.statusCode == 200) {
|
||||||
|
ServerInfoResponse* serverInfoResp = [[ServerInfoResponse alloc] init];
|
||||||
|
[hMan executeRequestSynchronously:[HttpRequest requestForResponse:serverInfoResp withUrlRequest:[hMan newServerInfoRequest]
|
||||||
|
fallbackError:401 fallbackRequest:[hMan newHttpServerInfoRequest]]];
|
||||||
|
if (![serverInfoResp isStatusOk] || ![[serverInfoResp getStringTag:@"state"] hasSuffix:@"_SERVER_AVAILABLE"]) {
|
||||||
|
// On newer GFE versions, the quit request succeeds even though the app doesn't
|
||||||
|
// really quit if another client tries to kill your app. We'll patch the response
|
||||||
|
// to look like the old error in that case, so the UI behaves.
|
||||||
|
quitResponse.statusCode = 599;
|
||||||
|
}
|
||||||
|
}
|
||||||
[_discMan addHostToDiscovery:app.host];
|
[_discMan addHostToDiscovery:app.host];
|
||||||
|
|
||||||
UIAlertController* alert;
|
UIAlertController* alert;
|
||||||
|
|||||||
Reference in New Issue
Block a user