Skip to content

Commit af46940

Browse files
committed
ios/tvos: disable GCDWebServer automatic background suspend
This possibly fixes an XPC crash on foregrounding
1 parent 5d32ea8 commit af46940

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/apple/WebServer/WebServer.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ -(void)startServers {
4949
GCDWebServerOption_ServerName : @"RetroArch",
5050
GCDWebServerOption_BonjourName : @"RetroArch",
5151
GCDWebServerOption_BonjourType : @"_webdav._tcp",
52-
GCDWebServerOption_Port : @(8080)
52+
GCDWebServerOption_Port : @(8080),
53+
GCDWebServerOption_AutomaticallySuspendInBackground : @NO
5354
};
5455
[_webDAVServer startWithOptions:webDAVSeverOptions error:nil];
5556

@@ -60,7 +61,8 @@ -(void)startServers {
6061
GCDWebServerOption_ServerName : @"RetroArch",
6162
GCDWebServerOption_BonjourName : @"RetroArch",
6263
GCDWebServerOption_BonjourType : @"_http._tcp",
63-
GCDWebServerOption_Port : @(80)
64+
GCDWebServerOption_Port : @(80),
65+
GCDWebServerOption_AutomaticallySuspendInBackground : @NO
6466
};
6567
[_webUploader startWithOptions:webSeverOptions error:nil];
6668
}

0 commit comments

Comments
 (0)