Skip to content

Commit

Permalink
Fix semaphore issues (#91)
Browse files Browse the repository at this point in the history
* Fix wait time of semaphore to block for as long as needed
  • Loading branch information
arun251 authored May 18, 2017
1 parent 06a19c4 commit c11b215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Darkly/LDRequestManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ -(void)performFeatureFlagRequest:(NSString *)encodedUser

[dataTask resume];

dispatch_semaphore_wait(semaphore, kConnectionTimeout);
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);

} else {
DEBUG_LOGX(@"RequestManager unable to sync config to server since no encodedUser");
Expand Down Expand Up @@ -117,7 +117,7 @@ -(void)performEventRequest:(NSArray *)jsonEventArray

[dataTask resume];

dispatch_semaphore_wait(semaphore, kConnectionTimeout);
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);

} else {
DEBUG_LOGX(@"RequestManager unable to sync events to server since no events");
Expand Down

0 comments on commit c11b215

Please sign in to comment.