Fix deadlock when two users use selector at the same time

This commit is contained in:
Victor Mignot 2023-05-02 18:08:23 +02:00
parent 8ed0e9079b
commit a2dd37118a
No known key found for this signature in database
GPG key ID: FFE4EF056FB5E0D0

View file

@ -153,6 +153,7 @@ impl EventHandler for Handler {
.run(ctx.clone(), self.database.clone())
.await
} else {
drop(users_selector);
Err(CommandExecutionError::SelectorError(
"User has already a selector running".to_string(),
))
@ -169,6 +170,7 @@ impl EventHandler for Handler {
.run(ctx.clone(), self.database.clone())
.await
} else {
drop(users_selector);
Err(CommandExecutionError::SelectorError(
"User has already a selector running".to_string(),
))