We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ca821a commit fd42813Copy full SHA for fd42813
crates/lsp/src/lsp.rs
@@ -532,12 +532,15 @@ impl LanguageServer {
532
533
while let Some(msg) = input_handler.notifications_channel.next().await {
534
{
535
- let notification_handlers = notification_handlers.lock();
536
- if let Some(handler) = notification_handlers.get(msg.method.as_str()).cloned() {
537
- drop(notification_handlers);
+ let handler = {
+ notification_handlers
+ .lock()
538
+ .get(msg.method.as_str())
539
+ .cloned()
540
+ };
541
+ if let Some(handler) = handler {
542
handler(msg.id, msg.params.unwrap_or(Value::Null), cx.clone()).await;
543
} else {
544
on_unhandled_notification(msg);
545
}
546
0 commit comments