Skip to content

Commit

Permalink
fix: change to single-thread mode again
Browse files Browse the repository at this point in the history
  • Loading branch information
Desdaemon committed Nov 13, 2024
1 parent 7ac2f04 commit f209001
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,15 +828,15 @@ impl LanguageServer for Backend {
}
}

#[tokio::main(flavor = "multi_thread", worker_threads = 2)]
#[tokio::main(flavor = "current_thread")]
async fn main() {
let outlog = std::env::var("ODOO_LSP_LOG").ok().map(|var| {
let outlog = std::env::var("ODOO_LSP_LOG").ok().and_then(|var| {
let path = match var.as_str() {
#[cfg(unix)]
"1" => Path::new("/tmp/odoo_lsp.log"),
_ => Path::new(&var),
};
std::fs::File::create(path).unwrap()
std::fs::OpenOptions::new().create(true).append(true).open(path).ok()
});
let registry = tracing_subscriber::registry().with(EnvFilter::from_default_env());
let layer = tracing_subscriber::fmt::layer()
Expand Down

0 comments on commit f209001

Please sign in to comment.