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

Fix resending batched messages #341

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

vladbat00
Copy link
Contributor

@vladbat00 vladbat00 commented Jun 19, 2022

Due to a bug with iterating Map values, batched messages are never re-sent. This PR fixes it and also corrects a couple of errors related to type checking.

I believe this also closes #178. I reproduced the bug when signing in with a phone number that is served by another DC. When reconnecting, a client tries to send help.GetConfig and MsgsAck messages in a batch, receives a bad salt message, but never resends them because resending batches is broken (this is why the client also got stuck).

@painor
Copy link
Member

painor commented Jun 19, 2022

oh wow, I must have missed that when updating to bigInt. good find,
I'll test it out and see if everything is OK!.

Thanks for the PR.

@painor
Copy link
Member

painor commented Jun 20, 2022

The batched messages part works fine and it did fix some issues.

As for the StoreBase it doesn't work for me.
image

Using version "store2": "^2.12.0",

@painor
Copy link
Member

painor commented Jun 20, 2022

Ok I needed to update store2. I'll do that in master

@painor painor merged commit a23a734 into gram-js:master Jun 20, 2022
@vladbat00
Copy link
Contributor Author

Oh, my bad, I was using yarn to install the dependencies and it ignored the package-lock.json file, this is why I had a different version of store2. Thank you for merging it!

@vladbat00 vladbat00 deleted the fix-resending-batches branch June 20, 2022 14:28
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.

Bot Sign-in stuck
2 participants