Avoid crashing with 2 instances of the same LSP (#9134)

This commit is contained in:
Gabriel Lopes Rodrigues 2024-01-02 12:29:22 -03:00 committed by GitHub
parent 85fce2f5b6
commit 7fd266efa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
});