Skip to content

Commit

Permalink
fix(leanplum): Response callback called from background LP-8195 (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisoyama committed Jan 9, 2018
1 parent 1165934 commit dd43eaf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Leanplum-SDK/Classes/LeanplumRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,9 @@ - (void)sendRequests:(BOOL)async
LP_TRY
NSLog(@"Leanplum: Request %@ timed out", _apiMethod);
[op cancel];
if (_error != nil) {
_error([NSError errorWithDomain:@"Leanplum" code:1
userInfo:@{NSLocalizedDescriptionKey: @"Request timed out"}]);
}
NSError *error = [NSError errorWithDomain:@"Leanplum" code:1
userInfo:@{NSLocalizedDescriptionKey: @"Request timed out"}];
[LPEventCallbackManager invokeErrorCallbacksWithError:error];
[[LeanplumRequest sendNowQueue] cancelAllOperations];
LP_END_TRY
}
Expand Down

0 comments on commit dd43eaf

Please sign in to comment.