aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/res/values-v21
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2015-07-10 02:36:29 +0200
committerAndreas Straub <andy@strb.org>2015-07-10 02:45:58 +0200
commit3615b12cbbc016df0c3a33b8b311308f9037bbc1 (patch)
tree40ad99d435267800802baee33706f662aaabca84 /src/main/res/values-v21
parentcc661dc4774f1bfa4955a94ca7830fd5384be81c (diff)
Ensure that available sessions are always used
Any time a new session is established, call syncRosterToDisk() to ensure that on subsequent restoreFromDatabase() calls, the roster is actually available. This is important so that initAccountServices() can properly initialize the SessionMap. This prevents a race condition where after adding a new account and initiating sessions with it, if the app is killed (e.g. by reinstall) before triggering a syncRosterToDisk(), subsequent restores will not have the roster available, leading to missing XmppAxolotlSessions in the SessionMap cache. As a result of this, a new session was initiated when sending a new message, and received messages could not be tagged with the originating session's fingerprint. As an added sanity check, go to the database to confirm no records are present before creating fresh XmppAxolotlSession objects (both in the sending and receiving case).
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions