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

Message order is not kept during connection lost. #3259

Closed
daschuer opened this issue Jan 8, 2019 · 1 comment
Closed

Message order is not kept during connection lost. #3259

daschuer opened this issue Jan 8, 2019 · 1 comment
Assignees

Comments

@daschuer
Copy link

daschuer commented Jan 8, 2019

Android App 21.2.106

Post a message with weak internet connection. Look at the spinner.
Post a follow up messahe to the same thread. Get an other spinner.
Internet is back.
The last message appears on top of the old one.

@borisyankov borisyankov self-assigned this Jan 8, 2019
@borisyankov
Copy link
Contributor

Thanks for this bug report. Looking at the code I see how that can happen.
I think a fix is not hard to do.

borisyankov added a commit to borisyankov/zulip-mobile that referenced this issue Jan 13, 2019
Fixes zulip#3259

When sending more than onemessages with poor connectivity there is
a likely and unwanted scenario that can happen: mesages sent early might
fail to reach the server but later ones might succeed thus resulting in
the incorrect order.

Extracting the try-catch block outside the 'forEach' loopensures that
a single failed message will also fail the sending of older messages.o

Better retry strategy is coming in a separate PR soon.
gnprice pushed a commit to borisyankov/zulip-mobile that referenced this issue Jan 14, 2019
Fixes zulip#3259.

When sending more than one message with poor connectivity there is a
likely and unwanted scenario that can happen: mesages sent early might
fail to reach the server but later ones might succeed thus resulting
in the incorrect order.

Extracting the try-catch block outside the 'forEach' loop ensures that
a single failed message will also fail the sending of later messages.

Better retry strategy is coming in a separate commit soon.
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

2 participants