Updating documentation for -pause
Returning early for -pause if operation is already cancelled
This commit is contained in:
parent
70787ce4cf
commit
b9641edc81
2 changed files with 2 additions and 2 deletions
|
|
@ -159,7 +159,7 @@ extern NSString * const AFNetworkingOperationDidFinishNotification;
|
||||||
/**
|
/**
|
||||||
Pauses the execution of the request operation.
|
Pauses the execution of the request operation.
|
||||||
|
|
||||||
@discussion A paused operation returns `NO` for `-isReady`, `-isExecuting`, and `-isFinished`. As such, it will remain in an `NSOperationQueue` until it is either cancelled or resumed. Pausing a finished or cancelled operation has no effect.
|
@discussion A paused operation returns `NO` for `-isReady`, `-isExecuting`, and `-isFinished`. As such, it will remain in an `NSOperationQueue` until it is either cancelled or resumed. Pausing a finished, cancelled, or paused operation has no effect.
|
||||||
*/
|
*/
|
||||||
- (void)pause;
|
- (void)pause;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)pause {
|
- (void)pause {
|
||||||
if ([self isPaused] || [self isFinished]) {
|
if ([self isPaused] || [self isFinished] || [self isCancelled]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue