Fix request throttling

Requests to Chaturbate were not throttled properly
This commit is contained in:
0xboobface 2018-10-01 17:25:35 +02:00
parent 3df1dbf911
commit 63a91b830d
1 changed files with 2 additions and 1 deletions

View File

@ -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 {