Fix request throttling
Requests to Chaturbate were not throttled properly
This commit is contained in:
parent
3df1dbf911
commit
63a91b830d
|
@ -262,10 +262,11 @@ public class Model {
|
|||
|
||||
private void throttleRequests() throws InterruptedException {
|
||||
long now = System.currentTimeMillis();
|
||||
long diff = now-lastRequest;
|
||||
long diff = now - lastRequest;
|
||||
if(diff < 500) {
|
||||
Thread.sleep(diff);
|
||||
}
|
||||
lastRequest = now;
|
||||
}
|
||||
|
||||
public MasterPlaylist getMasterPlaylist(String modelName) throws IOException, ParseException, PlaylistException, ExecutionException {
|
||||
|
|
Loading…
Reference in New Issue