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 sequenceID is not equal to cause the connection to be closed incorrectly #774

Merged
merged 2 commits into from
May 11, 2022

Conversation

wolfstudy
Copy link
Member

Motivation

When processing the sendReceipt command, if the sequenceID returned by the broker is greater than the sequenceID in the current pendingQueue, we need to close the current connection to fix the inconsistency between the broker and the client state.
When the sequenceID returned by the broker is smaller than the sequenceID in the current pendingQueue, we do not need to close the current connection, and expect to increment the value of the returned sequenceID when the broker retries next time.

The current code processing logic is just the opposite, resulting in the failure to recover after the first situation occurs, and a phenomenon similar to the following occurs:

image

…rrectly

Signed-off-by: xiaolongran <xiaolongran@tencent.com>
…rrectly

Signed-off-by: xiaolongran <xiaolongran@tencent.com>
@wolfstudy wolfstudy added this to the v0.9.0 milestone May 11, 2022
@wolfstudy wolfstudy self-assigned this May 11, 2022
@wolfstudy wolfstudy merged commit d9b1083 into apache:master May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants