* Instantiate new RemoteArchiveBean for each archive fetched by the updater, to prevent weirdness if the index fetch for archive n+1 fails.
* Add a blocking fetch to EepGetScheduler and RemoteArchiveBean and use them from the updater, to prevent race conditions with multiple archive fetches.
This commit is contained in:
@ -33,6 +33,15 @@ public class EepGetScheduler implements EepGet.StatusListener {
|
||||
t.start();
|
||||
}
|
||||
|
||||
public void fetch(boolean shouldBlock) {
|
||||
//Checking for a valid index is done in fetchNext, so we don't have to worry about it.
|
||||
if (shouldBlock) {
|
||||
fetchNext();
|
||||
} else {
|
||||
fetch();
|
||||
}
|
||||
}
|
||||
|
||||
private void fetchNext() {
|
||||
_curURL++;
|
||||
if (_curURL >= _urls.size()) return;
|
||||
|
Reference in New Issue
Block a user