diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-05-17 21:38:32 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-05-17 21:38:32 +0200 |
commit | d1449161398a099db7f3c5e10ccfc07dd8cffe3b (patch) | |
tree | 9126825c4f147bd219be5d21f9eb88d6f1976540 /src/main/java/de/pixart/messenger/services | |
parent | a57eba2eeaf462e09f963621e34d98a4363bfa60 (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.java | 4 |
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); } |