Don't start a background task while the app is already in background

This commit is contained in:
Pierre-Olivier Latour
2015-04-30 14:53:45 -07:00
parent 00b2c38109
commit a3606d6027
+3 -1
View File
@@ -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:)]) {