File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,7 @@ - (void)sendRequests:(BOOL)async
305305 __weak NSBlockOperation *weakOperation = requestOperation;
306306
307307 void (^operationBlock)(void ) = ^void () {
308+ LP_TRY
308309 if ([weakOperation isCancelled ]) {
309310 return ;
310311 }
@@ -340,6 +341,7 @@ - (void)sendRequests:(BOOL)async
340341
341342 // Request callbacks.
342343 [op addCompletionHandler: ^(id <LPNetworkOperationProtocol> operation, id json) {
344+ LP_TRY
343345 if ([weakOperation isCancelled ]) {
344346 dispatch_semaphore_signal (semaphore);
345347 return ;
@@ -364,14 +366,15 @@ - (void)sendRequests:(BOOL)async
364366 operation: operation];
365367 }
366368 dispatch_semaphore_signal (semaphore);
369+ LP_END_TRY
367370
368371 } errorHandler: ^(id <LPNetworkOperationProtocol> completedOperation, NSError *err) {
372+ LP_TRY
369373 if ([weakOperation isCancelled ]) {
370374 dispatch_semaphore_signal (semaphore);
371375 return ;
372376 }
373377
374- LP_TRY
375378 // Retry on 500 and other network failures.
376379 NSInteger httpStatusCode = completedOperation.HTTPStatusCode ;
377380 if (httpStatusCode == 408
@@ -429,6 +432,7 @@ - (void)sendRequests:(BOOL)async
429432 [[LeanplumRequest sendNowQueue ] cancelAllOperations ];
430433 LP_END_TRY
431434 }
435+ LP_END_TRY
432436 };
433437
434438 // Send. operationBlock will run synchronously.
You can’t perform that action at this time.
0 commit comments