synchronize around adding query to query map

This commit is contained in:
Daniel Gultsch 2017-05-07 15:47:18 +02:00
parent a5d9932b08
commit 185dac6953
1 changed files with 3 additions and 1 deletions

View File

@ -75,7 +75,9 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded {
query = new Query(account, startCatchup, endCatchup);
query.reference = reference;
}
this.queries.add(query);
synchronized (this.queries) {
this.queries.add(query);
}
this.execute(query);
}