bot_manager: fix MutexGuard lifetime

This commit is contained in:
Akulij 2025-06-07 02:59:07 +05:00
parent c3386a1e2f
commit c0eb5ba412

View File

@ -218,9 +218,10 @@ pub async fn spawn_notificator_thread(
rt.block_on(async { rt.block_on(async {
loop { loop {
let notifications = {
let r = c.runtime.lock().expect("Poisoned Runtime lock"); let r = c.runtime.lock().expect("Poisoned Runtime lock");
let notifications = r.rc.get_nearest_notifications(); r.rc.get_nearest_notifications()
drop(r); // unlocking mutex };
match notifications { match notifications {
Some(n) => { Some(n) => {