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

Upload one-time keys on /sync rather than a timer #376

Merged
merged 1 commit into from
Feb 21, 2017

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Feb 20, 2017

Delay the upload of one-time keys until we have received a sync without any to-device messages. Doing so means that we can try to avoid throwing away our private keys just before we receive the to-device messages which use them.

Once we've decided to go ahead and upload them, we keep uploading them in batches of 5 until we get to the desired 50 keys on the server. We then periodically check that there are still enough on the server.

Fixes element-hq/element-web#2782.

Delay the upload of one-time keys until we have received a sync *without any
to-device messages*. Doing so means that we can try to avoid throwing away our
private keys just before we receive the to-device messages which use them.

Once we've decided to go ahead and upload them, we keep uploading them in
batches of 5 until we get to the desired 50 keys on the server. We then
periodically check that there are still enough on the server.
Copy link
Contributor

@NegativeMjark NegativeMjark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@richvdh richvdh merged commit bbe74e6 into develop Feb 21, 2017
manuroe added a commit to matrix-org/matrix-ios-sdk that referenced this pull request Mar 7, 2017
And delay the upload of one-time keys until we have received a sync without any to-device messages.

Equivalent to matrix-org/matrix-js-sdk#376
@richvdh richvdh deleted the rav/delay_otk_generation branch May 19, 2017 13:19
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

Successfully merging this pull request may close these issues.

2 participants