Skip to content

Commit

Permalink
Fixed requests cancelling.
Browse files Browse the repository at this point in the history
  • Loading branch information
ogubariev committed May 25, 2016
1 parent 8f94d60 commit 12a4805
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/JSRestClient/JSRESTBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ - (nullable JSServerInfo *)serverInfo {
}

- (void)cancelAllRequests {
for (JSCallBack *callback in self.requestCallBacks) {
while (self.requestCallBacks.count) {
JSCallBack *callback = [self.requestCallBacks firstObject];
@synchronized (callback) {
callback.request.completionBlock = nil;
[callback.dataTask cancel];
Expand Down

0 comments on commit 12a4805

Please sign in to comment.