diff options
author | Andreas Straub <andy@strb.org> | 2015-07-10 02:36:29 +0200 |
---|---|---|
committer | Andreas Straub <andy@strb.org> | 2015-07-19 22:23:27 +0200 |
commit | 35714d3d08d287c5ded125c356835fb70ab342b7 (patch) | |
tree | 472f9419e358aab3c750a57f141fd859711e320e /src/main/res/drawable-hdpi/tab_unselected_conversations.9.png | |
parent | 31d375c2c374dc8a36539a78582f44accc13592e (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 'src/main/res/drawable-hdpi/tab_unselected_conversations.9.png')
0 files changed, 0 insertions, 0 deletions