diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-08-01 13:02:01 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-08-01 13:02:01 +0200 |
commit | 7e0d6f846030ce6632e0071bfa0a9301a2ff778d (patch) | |
tree | 0e6800b8c2b37d97a3bc33fbe30c53e87c0464b1 /src/main/java | |
parent | f9429d5fcdc5c3d7c8242e819fe8fe903405166c (diff) |
let hasPendingFetches() return true when fetching device ids
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java index 60200bc90..340f050c5 100644 --- a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java +++ b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java @@ -1134,10 +1134,12 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded { if (fetchStatusMap.getAll(ownAddress.getName()).containsValue(FetchStatus.PENDING)) { return true; } - for (Jid jid : jids) { - SignalProtocolAddress foreignAddress = new SignalProtocolAddress(jid.toBareJid().toPreppedString(), 0); - if (fetchStatusMap.getAll(foreignAddress.getName()).containsValue(FetchStatus.PENDING)) { - return true; + synchronized (this.fetchDeviceIdsMap) { + for (Jid jid : jids) { + SignalProtocolAddress foreignAddress = new SignalProtocolAddress(jid.toBareJid().toPreppedString(), 0); + if (fetchStatusMap.getAll(foreignAddress.getName()).containsValue(FetchStatus.PENDING) || this.fetchDeviceIdsMap.containsKey(jid)) { + return true; + } } } return false; |