@@ -26,7 +26,7 @@ @interface STNetTaskQueue()
2626@property (nonatomic , strong ) NSRecursiveLock *lock;
2727@property (nonatomic , strong ) NSMutableDictionary *taskDelegates; // <NSString, NSHashTable<STNetTaskDelegate>>
2828@property (nonatomic , strong ) NSMutableArray *tasks; // <STNetTask>
29- @property (nonatomic , strong ) NSMutableArray *watingTasks ; // <STNetTask>
29+ @property (nonatomic , strong ) NSMutableArray *waitingTasks ; // <STNetTask>
3030
3131@end
3232
@@ -52,7 +52,7 @@ - (id)init
5252 self.lock .name = [NSString stringWithFormat: @" %@ Lock" , NSStringFromClass (self .class)];
5353 self.taskDelegates = [NSMutableDictionary new ];
5454 self.tasks = [NSMutableArray new ];
55- self.watingTasks = [NSMutableArray new ];
55+ self.waitingTasks = [NSMutableArray new ];
5656 }
5757 return self;
5858}
@@ -95,7 +95,7 @@ - (void)addTask:(STNetTask *)task
9595- (void )_addTask : (STNetTask *)task
9696{
9797 if (self.maxConcurrentTasksCount > 0 && self.tasks .count >= self.maxConcurrentTasksCount ) {
98- [self .watingTasks addObject: task];
98+ [self .waitingTasks addObject: task];
9999 return ;
100100 }
101101
@@ -117,7 +117,7 @@ - (void)cancelTask:(STNetTask *)task
117117- (void )_cancelTask : (STNetTask *)task
118118{
119119 [self .tasks removeObject: task];
120- [self .watingTasks removeObject: task];
120+ [self .waitingTasks removeObject: task];
121121 task.pending = NO ;
122122
123123 [self .handler netTaskQueue: self didCancelTask: task];
@@ -144,13 +144,13 @@ - (void)_retryTask:(STNetTask *)task
144144 }
145145}
146146
147- - (void )_sendWatingTasks
147+ - (void )_sendwaitingTasks
148148{
149- if (!self.watingTasks .count ) {
149+ if (!self.waitingTasks .count ) {
150150 return ;
151151 }
152- STNetTask *task = self.watingTasks .firstObject ;
153- [self .watingTasks removeObjectAtIndex: 0 ];
152+ STNetTask *task = self.waitingTasks .firstObject ;
153+ [self .waitingTasks removeObjectAtIndex: 0 ];
154154 [self addTask: task];
155155}
156156
@@ -191,7 +191,7 @@ - (void)_task:(STNetTask *)task didResponse:(id)response
191191
192192 [self _netTaskDidEnd: task];
193193
194- [self _sendWatingTasks ];
194+ [self _sendwaitingTasks ];
195195}
196196
197197- (void )task : (STNetTask *)task didFailWithError : (NSError *)error
@@ -222,7 +222,7 @@ - (void)_task:(STNetTask *)task didFailWithError:(NSError *)error
222222
223223 [self _netTaskDidEnd: task];
224224
225- [self _sendWatingTasks ];
225+ [self _sendwaitingTasks ];
226226}
227227
228228- (void )_netTaskDidEnd : (STNetTask *)task
0 commit comments