diff --git a/AFNetworking/AFURLConnectionOperation.h b/AFNetworking/AFURLConnectionOperation.h index 0da353a..c8c9487 100644 --- a/AFNetworking/AFURLConnectionOperation.h +++ b/AFNetworking/AFURLConnectionOperation.h @@ -159,7 +159,7 @@ extern NSString * const AFNetworkingOperationDidFinishNotification; /** 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; diff --git a/AFNetworking/AFURLConnectionOperation.m b/AFNetworking/AFURLConnectionOperation.m index d378465..fdacb36 100644 --- a/AFNetworking/AFURLConnectionOperation.m +++ b/AFNetworking/AFURLConnectionOperation.m @@ -355,7 +355,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat } - (void)pause { - if ([self isPaused] || [self isFinished]) { + if ([self isPaused] || [self isFinished] || [self isCancelled]) { return; }