Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To-device messages have no ordering, so if they're delayed they can arrive out of order, breaking signalling. #168

Closed
ara4n opened this issue Jan 9, 2022 · 3 comments

Comments

@ara4n
Copy link
Member

ara4n commented Jan 9, 2022

I haven't seen this in the wild, but there's nothing stopping it from happening if a client sets up quickly and blats out m.call.invite & candidates at precisely the same moment - there's a distinct chance the candidate will make it to the recipient before the invite does.

Same as https://github.com/matrix-org/matrix-doc/issues/3630

@ara4n
Copy link
Member Author

ara4n commented Jan 14, 2022

Suggestion:

  • each to-device event sent by a given device in a given call gets an incremental seq field, starting at 1.
  • the receiver should buffer inbound messages if they arrive out of order.
  • if messages go missing, the client should log a warning and discard the buffer after a ~10 minute timeout.

@SimonBrandner
Copy link
Contributor

Suggestion:

  • each to-device event sent by a given device in a given call gets an incremental seq field, starting at 1.
  • the receiver should buffer inbound messages if they arrive out of order.
  • if messages go missing, the client should log a warning and discard the buffer after a ~10 minute timeout.

TBH, that just feels like a temporary workaround and I'd rather see a proper solution though I am not really sure how easy fix would that be 🤔

@robertlong
Copy link
Contributor

We now use a seq number and order the messages properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants