3636
3737__attribute__ ((constructor))
3838static void initialize_tables() {
39- if (expirationTable == nil )
40- {
39+ if (expirationTable == nil ) {
4140 expirationTable = [[NSMapTable alloc ] init ];
4241 }
4342}
@@ -62,6 +61,7 @@ - (id)init {
6261+ (RNFetchBlobNetwork* _Nullable)sharedInstance {
6362 static id _sharedInstance = nil ;
6463 static dispatch_once_t onceToken;
64+
6565 dispatch_once (&onceToken, ^{
6666 _sharedInstance = [[self alloc ] init ];
6767 });
@@ -116,7 +116,7 @@ - (void) cancelRequest:(NSString *)taskId
116116 task = [self .requestsTable objectForKey: taskId].task ;
117117 }
118118
119- if (task && task.state == NSURLSessionTaskStateRunning ) {
119+ if (task && task.state == NSURLSessionTaskStateRunning ) {
120120 [task cancel ];
121121 }
122122}
@@ -125,7 +125,7 @@ - (void) cancelRequest:(NSString *)taskId
125125+ (NSMutableDictionary *) normalizeHeaders : (NSDictionary *)headers
126126{
127127 NSMutableDictionary * mheaders = [[NSMutableDictionary alloc ]init];
128- for (NSString * key in headers) {
128+ for (NSString * key in headers) {
129129 [mheaders setValue: [headers valueForKey: key] forKey: [key lowercaseString ]];
130130 }
131131
@@ -139,7 +139,7 @@ + (void) emitExpiredTasks
139139 NSEnumerator * emu = [expirationTable keyEnumerator ];
140140 NSString * key;
141141
142- while ((key = [emu nextObject ]))
142+ while ((key = [emu nextObject ]))
143143 {
144144 RCTBridge * bridge = [RNFetchBlob getRCTBridge ];
145145 id args = @{ @" taskId" : key };
0 commit comments