Avoid crashing with 2 instances of the same LSP (#9134)
This commit is contained in:
parent
85fce2f5b6
commit
7fd266efa9
1 changed files with 10 additions and 3 deletions
|
@ -915,10 +915,17 @@ fn start_client(
|
|||
}
|
||||
|
||||
// next up, notify<initialized>
|
||||
_client
|
||||
let notification_result = _client
|
||||
.notify::<lsp::notification::Initialized>(lsp::InitializedParams {})
|
||||
.await
|
||||
.unwrap();
|
||||
.await;
|
||||
|
||||
if let Err(e) = notification_result {
|
||||
log::error!(
|
||||
"failed to notify language server of its initialization: {}",
|
||||
e
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
initialize_notify.notify_one();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue