mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-04-24 00:00:04 +08:00
Don't start a background task while the app is already in background
This commit is contained in:
@@ -244,7 +244,9 @@ static void _ExecuteMainThreadRunLoopSources() {
|
||||
GWS_LOG_DEBUG(@"Did connect");
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
[self _startBackgroundTask];
|
||||
if ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground) {
|
||||
[self _startBackgroundTask];
|
||||
}
|
||||
#endif
|
||||
|
||||
if ([_delegate respondsToSelector:@selector(webServerDidConnect:)]) {
|
||||
|
||||
Reference in New Issue
Block a user