Talk-android: Immediate back button after "start/join call" results in broken state

Created on 11 Feb 2020  ·  4Comments  ·  Source: nextcloud/talk-android

Steps

  1. Have a conversation with a slow internet connection
  2. Go to a conversation
  3. Press "Start call"
  4. Immediately press back

Expected

If the join call request finishes, it should be left again afterwards

Actually

"Leave call" reaches the server before the join finishes.
This leads to wrong order of join/leave messages and results in "has_call" being left on for the conversation. Of course the API should make sure to clear up the state when a person leaves, but then again the requests should also be sent in the correct order (dont leave before join finished)

Bildschirmfoto von 2020-02-11 15-09-14

bug high ☎️ call

Most helpful comment

So if the back button is pushed and we have already sent out a join request, we need to wait for a response or timeout and then send the terminate message, and put that in an async task so that we don't affect the UI for the user who hit back and is already trying to do something else.

All 4 comments

Yes, requests ordering is tricky business unless you limit the number of concurrent connections to 1, which would make it all the more fun. But I think I know how to solve this and will work on it in the future.

Yes, requests ordering is tricky business unless you limit the number of concurrent connections to 1

Well you could also store the state somewhere and when you finally get the response of the "join" you check if the user wants to leave already and actually only send the "leave" then.

Yup, being worked on already :)

On Tue, 11 Feb 2020, 15:44 Joas Schilling, notifications@github.com wrote:

Yes, requests ordering is tricky business unless you limit the number of
concurrent connections to 1

Well you could also store the state somewhere and when you finally get the
response of the "join" you check if the user wants to leave already and
actually only send the "leave" then.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/nextcloud/talk-android/issues/724?email_source=notifications&email_token=AAABNMUMT4FH6J2QTB3VABDRCK2WNA5CNFSM4KTBTWHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELMVQVA#issuecomment-584669268,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAABNMUKIFWIRIEZE6JWAD3RCK2WNANCNFSM4KTBTWHA
.

So if the back button is pushed and we have already sent out a join request, we need to wait for a response or timeout and then send the terminate message, and put that in an async task so that we don't affect the UI for the user who hit back and is already trying to do something else.

Was this page helpful?
0 / 5 - 0 ratings