Skip to content

Commit ac05606

Browse files
authored
send all counts (#210)
1 parent 2a9209f commit ac05606

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Leanplum-SDK/Classes/Managers/Networking/LPRequestSender.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#import "LPRequestSender.h"
2626
#import "LeanplumInternal.h"
27+
#import "LPCountAggregator.h"
2728
#import "LPRequest.h"
2829
#import "LeanplumRequest.h"
2930
#import "LPResponse.h"
@@ -330,6 +331,7 @@ - (void)sendRequests:(BOOL)sync
330331
self.lastSentTime = [NSDate timeIntervalSinceReferenceDate];
331332
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
332333

334+
[[LPCountAggregator sharedAggregator] sendAllCounts];
333335
// Simulate pop all requests.
334336
NSArray *requestsToSend = [LPEventDataManager eventsWithLimit:MAX_EVENTS_PER_API_CALL];
335337
if (requestsToSend.count == 0) {

Leanplum-SDK/Classes/Managers/Networking/LeanplumRequest.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#import "Leanplum.h"
2626
#import "LeanplumInternal.h"
2727
#import "LeanplumRequest.h"
28+
#import "LPCountAggregator.h"
2829
#import "LPResponse.h"
2930
#import "Constants.h"
3031
#import "LPFileManager.h"
@@ -251,7 +252,8 @@ - (void)sendRequests:(BOOL)async
251252
[LeanplumRequest generateUUID];
252253
lastSentTime = [NSDate timeIntervalSinceReferenceDate];
253254
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
254-
255+
256+
[[LPCountAggregator sharedAggregator] sendAllCounts];
255257
// Simulate pop all requests.
256258
NSArray *requestsToSend = [LPEventDataManager eventsWithLimit:MAX_EVENTS_PER_API_CALL];
257259
if (requestsToSend.count == 0) {

0 commit comments

Comments
 (0)