Skip to content

Commit dd43eaf

Browse files
authored
fix(leanplum): Response callback called from background LP-8195 (#116)
1 parent 1165934 commit dd43eaf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Leanplum-SDK/Classes/LeanplumRequest.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,9 @@ - (void)sendRequests:(BOOL)async
424424
LP_TRY
425425
NSLog(@"Leanplum: Request %@ timed out", _apiMethod);
426426
[op cancel];
427-
if (_error != nil) {
428-
_error([NSError errorWithDomain:@"Leanplum" code:1
429-
userInfo:@{NSLocalizedDescriptionKey: @"Request timed out"}]);
430-
}
427+
NSError *error = [NSError errorWithDomain:@"Leanplum" code:1
428+
userInfo:@{NSLocalizedDescriptionKey: @"Request timed out"}];
429+
[LPEventCallbackManager invokeErrorCallbacksWithError:error];
431430
[[LeanplumRequest sendNowQueue] cancelAllOperations];
432431
LP_END_TRY
433432
}

0 commit comments

Comments
 (0)