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,20 +768,19 @@ pub async fn generate_briefing(
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5. KB-Treffer zum Projekt (fehlertolerant)
|
// 5. KB-Treffer zum Projekt (fehlertolerant)
|
||||||
{
|
let project_name = {
|
||||||
let db = state.lock().unwrap();
|
let db = state.lock().unwrap();
|
||||||
let project_name = db.get_active_session().ok().flatten()
|
db.get_active_session().ok().flatten()
|
||||||
.and_then(|s| s.title.split_whitespace().next().map(|w| w.to_string()));
|
.and_then(|s| s.title.split_whitespace().next().map(|w| w.to_string()))
|
||||||
drop(db);
|
}; // MutexGuard ist hier garantiert weg — vor dem .await
|
||||||
|
|
||||||
if let Some(ref proj) = project_name {
|
if let Some(ref proj) = project_name {
|
||||||
match crate::knowledge::search_knowledge_internal(proj, 3).await {
|
match crate::knowledge::search_knowledge_internal(proj, 3).await {
|
||||||
Ok(hints) if !hints.is_empty() => {
|
Ok(hints) if !hints.is_empty() => {
|
||||||
parts.push(hints);
|
parts.push(hints);
|
||||||
sections.push("kb-hints".to_string());
|
sections.push("kb-hints".to_string());
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
}
|
}
|
||||||
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue