Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
asi-http-request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Ben Copsey
2011-08-20 02:43:29 -0700
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
1a7ae8109d4d495c1ae4e40b714d44c7769300c3
1a7ae810
2 parents
a879b8ec
8783cbce
Merge pull request #245 from mbelshe/master
Small fix to the bandwidth throttler.
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
Classes/ASIInputStream.m
Classes/ASIInputStream.m
View file @
1a7ae81
...
...
@@ -58,9 +58,11 @@ static NSLock *readLock = nil;
}
[
request
performThrottling
];
}
[
ASIHTTPRequest
incrementBandwidthUsedInLastSecond
:
toRead
];
[
readLock
unlock
];
return
[
stream
read
:
buffer
maxLength
:
toRead
];
NSInteger
rv
=
[
stream
read
:
buffer
maxLength
:
toRead
];
if
(
rv
>
0
)
[
ASIHTTPRequest
incrementBandwidthUsedInLastSecond
:
rv
];
return
rv
;
}
/*
...
...
Please
register
or
login
to post a comment