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>
|
// next up, notify<initialized>
|
||||||
_client
|
let notification_result = _client
|
||||||
.notify::<lsp::notification::Initialized>(lsp::InitializedParams {})
|
.notify::<lsp::notification::Initialized>(lsp::InitializedParams {})
|
||||||
.await
|
.await;
|
||||||
.unwrap();
|
|
||||||
|
if let Err(e) = notification_result {
|
||||||
|
log::error!(
|
||||||
|
"failed to notify language server of its initialization: {}",
|
||||||
|
e
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
initialize_notify.notify_one();
|
initialize_notify.notify_one();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue