fix: MutexGuard vor .await droppen (Send-bound) [appimage]
All checks were successful
Build AppImage / build (push) Successful in 6m57s
All checks were successful
Build AppImage / build (push) Successful in 6m57s
MutexGuard in eigenem Block isolieren damit er garantiert vor dem async .await gedroppt ist. Tauri-Commands muessen Send sein. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
64226cea00
commit
db87c0b8e1
1 changed files with 10 additions and 11 deletions
|
|
@ -768,11 +768,11 @@ pub async fn generate_briefing(
|
|||
}
|
||||
|
||||
// 5. KB-Treffer zum Projekt (fehlertolerant)
|
||||
{
|
||||
let project_name = {
|
||||
let db = state.lock().unwrap();
|
||||
let project_name = db.get_active_session().ok().flatten()
|
||||
.and_then(|s| s.title.split_whitespace().next().map(|w| w.to_string()));
|
||||
drop(db);
|
||||
db.get_active_session().ok().flatten()
|
||||
.and_then(|s| s.title.split_whitespace().next().map(|w| w.to_string()))
|
||||
}; // MutexGuard ist hier garantiert weg — vor dem .await
|
||||
|
||||
if let Some(ref proj) = project_name {
|
||||
match crate::knowledge::search_knowledge_internal(proj, 3).await {
|
||||
|
|
@ -783,7 +783,6 @@ pub async fn generate_briefing(
|
|||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if parts.is_empty() {
|
||||
return Ok(Briefing {
|
||||
|
|
|
|||
Loading…
Reference in a new issue