File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
STNetTaskQueueTest/STNetTaskQueueTest Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,10 @@ - (BOOL)_retryTask:(STNetTask *)task withError:(NSError *)error
125125
126126- (void )_retryTask : (STNetTask *)task
127127{
128- [task didRetry ];
129- [self addTask: task];
128+ if (!task.cancelled ) {
129+ [task didRetry ];
130+ [self addTask: task];
131+ }
130132}
131133
132134- (void )_sendWatingTasks
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ - (void)testCancelNetTask
6060{
6161 [self setUpNetTaskQueueWithBaseURLString: @" http://jsonplaceholder.typicode.com" ];
6262
63- _expectation = [self expectationWithDescription: @" testRetryNetTask " ];
63+ _expectation = [self expectationWithDescription: @" testCancelNetTask " ];
6464
6565 STTestRetryNetTask *testRetryTask = [STTestRetryNetTask new ];
6666 [[STNetTaskQueue sharedQueue ] addTaskDelegate: self uri: testRetryTask.uri];
You can’t perform that action at this time.
0 commit comments