@@ -80,19 +80,18 @@ void ForceCategoriesToLoad(void) {
8080 BNCForceNSMutableDictionaryCategoryToLoad ();
8181}
8282
83-
8483#pragma mark - Branch
8584
86-
87- @interface Branch () <BranchDeepLinkingControllerCompletionDelegate, FABKit>
88-
85+ @interface Branch () <BranchDeepLinkingControllerCompletionDelegate, FABKit> {
86+ NSInteger _networkCount;
87+ }
8988
9089@property (strong , nonatomic ) BNCServerInterface *bServerInterface;
9190@property (strong , nonatomic ) BNCServerRequestQueue *requestQueue;
9291@property (strong , nonatomic ) dispatch_semaphore_t processing_sema;
9392@property (copy , nonatomic ) callbackWithParams sessionInitWithParamsCallback;
9493@property (copy , nonatomic ) callbackWithBranchUniversalObject sessionInitWithBranchUniversalObjectCallback;
95- @property (assign , nonatomic ) NSInteger networkCount;
94+ @property (assign , atomic ) NSInteger networkCount;
9695@property (assign , nonatomic ) NSInteger asyncRequestCount;
9796@property (assign , nonatomic ) BOOL isInitialized;
9897@property (assign , nonatomic ) BOOL shouldCallSessionInitCallback;
@@ -1658,6 +1657,18 @@ - (void)callClose {
16581657
16591658#pragma mark - Queue management
16601659
1660+ - (NSInteger ) networkCount {
1661+ @synchronized (self) {
1662+ return _networkCount;
1663+ }
1664+ }
1665+
1666+ - (void ) setNetworkCount : (NSInteger )networkCount {
1667+ @synchronized (self) {
1668+ _networkCount = networkCount;
1669+ }
1670+ }
1671+
16611672- (void )insertRequestAtFront : (BNCServerRequest *)req {
16621673 if (self.networkCount == 0 ) {
16631674 [self .requestQueue insert: req at: 0 ];
0 commit comments