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 MQTT client close bugs #302

Merged
merged 1 commit into from
Oct 15, 2021
Merged

fix MQTT client close bugs #302

merged 1 commit into from
Oct 15, 2021

Conversation

suchen-sci
Copy link
Contributor

This pr mainly fix two bugs.

  1. When MQTT client and broker close at the same time, the client session may be closed twice, then double close channel will cause panic. (call SessionManager.delLocal method).
  2. When close client, the broker does not rm client from its map. Remove client from map is easy, but it may cause race condition. For example, when old client close and remove from broker, at same time, new client with same clientID come and store it to broker. Then broker may remove new client.

I hope this pr fix these bugs.

Copy link

@megaeasex megaeasex left a comment

Choose a reason for hiding this comment

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

[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 302 Deploy Test Success

@suchen-sci suchen-sci added the bug Something isn't working label Oct 14, 2021
@haoel
Copy link
Contributor

haoel commented Oct 14, 2021

I hope this pr fix these bugs.

You need to make sure this patch fixes the bugs. not just hope...

@suchen-sci suchen-sci merged commit c0f5200 into easegress-io:main Oct 15, 2021
@suchen-sci suchen-sci deleted the mqtt-bug branch October 15, 2021 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants