fix: scope the vcs_watcher borrow to possibly fix deadlock
This commit is contained in:
@@ -234,7 +234,7 @@ impl EventHandler for Handler {
|
||||
#[tracing::instrument(skip(state))]
|
||||
pub async fn handle(state: State, interaction: Interaction) {
|
||||
let guild_and_voice_channel_id_res =
|
||||
get_guild_and_voice_channel_id(&interaction, &state.vcs_watcher.borrow());
|
||||
{ get_guild_and_voice_channel_id(&interaction, &state.vcs_watcher.borrow()) };
|
||||
let (guild_id, voice_channel_id) = match guild_and_voice_channel_id_res {
|
||||
Ok((guild_id, voice_channel_id)) => (guild_id, voice_channel_id),
|
||||
Err(error) => {
|
||||
|
||||
Reference in New Issue
Block a user