-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unmutes were not being properly handled due to how I wrote the code previously. When a user is forcibly unmuted using the command, the future within the in-memory dashmap is aborted AND the database entry is now deleted after future abortion. However, aborting a future doesn't mean that the dashmap's entry containing the abort handler is deleted. There are two ways this could have been approached: 1. Forcibly drop the element guard's reference and delete the dashmap entry after aborting the future. 2. Abort the future and when the future is eventually awaited, delete the dashmap entry. I opted for number 2 because it allows for less redundant code and makes more sense idiomatically. If circumstances force me to adopt to number 1, I will do so, but forcibly dropping a reference from memory and deleting something seems like a bad idea in general instead of passively deleting entries from the dashmap. The mutes command has also been simplified and everything should hopefully be fine with this change. Signed-off-by: kingbri <[email protected]>
- Loading branch information
Showing
3 changed files
with
34 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters