diff --git a/vhdl_ls/src/stdio_server.rs b/vhdl_ls/src/stdio_server.rs index ca168547f..c1205b8b7 100644 --- a/vhdl_ls/src/stdio_server.rs +++ b/vhdl_ls/src/stdio_server.rs @@ -88,9 +88,10 @@ impl ConnectionRpcChannel { match message { lsp_server::Message::Request(request) => { match self.connection.handle_shutdown(&request) { - Ok(shutdown) => { - if shutdown { + Ok(should_exit) => { + if should_exit { server.shutdown_server(); + server.exit_notification(); } else { self.handle_request(&mut server, request) } @@ -272,11 +273,6 @@ impl ConnectionRpcChannel { Ok(params) => return server.workspace_did_change_watched_files(¶ms), Err(notification) => notification, }; - // exit - let notification = match extract::(notification) { - Ok(_params) => return server.exit_notification(), - Err(notification) => notification, - }; if !notification.method.starts_with("$/") { debug!("Unhandled notification: {notification:?}");