Fix Neovim connection deadlock by dropping NVIM_CONN lock across await boundary

This commit is contained in:
Riz Ashraf committed 2026-09-21 04:04:32 +01:00
1 parent b98f95d9d8
commit 9870626045
2 files changed
+9 -5

No files matched your search

+2 -1
View File
@@ -249,7 +249,8 @@ fn run_server(state: Arc<MemoryState>) -> Result<(), Box<dyn std::error::Error>>
post(
|headers: axum::http::HeaderMap, State(state): State<Arc<AppState>>| async move {
let token_path = state.handler.state.base_dir.join("admin.token");
let expected_token = std::fs::read_to_string(&token_path)
let expected_token = tokio::fs::read_to_string(&token_path)
.await
.unwrap_or_default()
.trim()
.to_string();