mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2024-10-07 00:08:05 +08:00
Handle starting the server with nil options
This commit is contained in:
parent
9719406303
commit
9c33c83351
@ -664,7 +664,7 @@ static inline NSString* _EncodeBase64(NSString* string) {
|
||||
|
||||
- (BOOL)startWithOptions:(NSDictionary*)options error:(NSError**)error {
|
||||
if (_options == nil) {
|
||||
_options = [options copy];
|
||||
_options = options ? [options copy] : @{};
|
||||
#if TARGET_OS_IPHONE
|
||||
_suspendInBackground = [_GetOption(_options, GCDWebServerOption_AutomaticallySuspendInBackground, @YES) boolValue];
|
||||
if (((_suspendInBackground == NO) || ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground)) && ![self _start:error])
|
||||
|
Loading…
Reference in New Issue
Block a user