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: delete will from persistence on disconnect #957

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

bmeverett
Copy link
Contributor

Problem

I was using aedes-persistence-redis and noticed that if clients connect with a will message then the keys weren't being deleted on a clean disconnect

Solution

The keys should always be removed from the persistence regardless if the the client disconnects cleanly or not. When the client disconnects, the will no longer should matter so we can delete it. If the client connects again with another will, then we can retain that one.

lib/client.js Outdated Show resolved Hide resolved
@robertsLando robertsLando merged commit a26b90b into moscajs:main Jun 7, 2024
14 checks passed
@coveralls
Copy link

coveralls commented Jun 7, 2024

Pull Request Test Coverage Report for Build 9412573480

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 99.743%

Totals Coverage Status
Change from base Build 9295732195: 0.001%
Covered Lines: 824
Relevant Lines: 824

💛 - Coveralls

@bmeverett bmeverett deleted the delete-will branch June 7, 2024 14:57
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.

3 participants