aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/services
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-05-17 21:38:32 +0200
committerChristian Schneppe <christian@pix-art.de>2017-05-17 21:38:32 +0200
commitd1449161398a099db7f3c5e10ccfc07dd8cffe3b (patch)
tree9126825c4f147bd219be5d21f9eb88d6f1976540 /src/main/java/de/pixart/messenger/services
parenta57eba2eeaf462e09f963621e34d98a4363bfa60 (diff)
synchronize around adding query to query map
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r--src/main/java/de/pixart/messenger/services/MessageArchiveService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/MessageArchiveService.java b/src/main/java/de/pixart/messenger/services/MessageArchiveService.java
index c74a71b08..5a5b0e9a1 100644
--- a/src/main/java/de/pixart/messenger/services/MessageArchiveService.java
+++ b/src/main/java/de/pixart/messenger/services/MessageArchiveService.java
@@ -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);
}