Description
BobState
is currently kept in memory only and there is only one BobState
. this has the following disadvantages:
-
if the app is terminated before Alice answers, the secure join will get stale. eg. iOS suspends app in the background already after 30 seconds, usually the memory is restored on coming to foreground again, but that depends: apps may also be terminated already after 30 seconds.EDIT this is fixed by #2920
android may have similar situations, but also a simple user-exit may terminate a handshake unexpectedly, esp. it that runs for several minutes. -
since instant success on simple qr-setup-contact #1215 and non-blocking group QR joins #2508 all handshakes run in background and
dc_join_securejoin()
always returns immediately with the chat-id.
however, ifdc_join_securejoin()
is called again before the old one has finished, the old one is aborted (which is already better than showing an error :)
the idea is to target both issues by handling BobState
completely in the database, eg. in a separate table, one row per state.