File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,7 +125,19 @@ - (void)operationDidFinish:(NSNotification *)notification {
125125
126126 NSURL *URL = (operation.response ) ? [operation.response URL ] : [operation.request URL ];
127127
128- if (operation.error ) {
128+ if (operation.error && operation.error .code == NSURLErrorCancelled) {
129+ switch (self.level ) {
130+ case AFHTTPClientLogLevelVerbose:
131+ NSLog (@" Cancelled %@ : %@ " , [URL absoluteString ], operation.error );
132+ break ;
133+ case AFHTTPClientLogLevelDebug:
134+ case AFHTTPClientLogLevelInfo:
135+ NSLog (@" Cancelled %@ : %@ " , [URL absoluteString ], [operation.error localizedDescription ]);
136+ break ;
137+ default :
138+ break ;
139+ }
140+ } else if (operation.error ) {
129141 switch (self.level ) {
130142 case AFHTTPClientLogLevelVerbose:
131143 case AFHTTPClientLogLevelDebug:
You can’t perform that action at this time.
0 commit comments