Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Commit

Permalink
Rate limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsdayrs committed Jun 28, 2019
1 parent b2b0eaf commit e8d3415
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.github.doomsdayrs.apps.shosetsu.ui.novel.NovelFragmentChapters;

import java.io.IOException;
import java.util.concurrent.TimeUnit;

/**
* This file is part of Shosetsu.
Expand Down Expand Up @@ -55,6 +56,7 @@ protected Boolean doInBackground(Integer... integers) {
}
}
if (!foundDif) {
TimeUnit.MILLISECONDS.sleep(100);
novelPage = novelFragmentChapters.formatter.parseNovel(novelFragmentChapters.novelURL, integers[0] + increment);
novelFragmentChapters.currentMaxPage++;
increment++;
Expand All @@ -64,6 +66,8 @@ protected Boolean doInBackground(Integer... integers) {
return true;
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
return false;
}
Expand Down

0 comments on commit e8d3415

Please sign in to comment.