increase LSP shutdown timeout

The Clang LAP takes a long time to shut down on Windows
pull/2267/head
Skyler Hawthorne 2 years ago
parent 8c667ef8de
commit faa00d4cc3

@ -1288,14 +1288,14 @@ impl Editor {
} }
} }
/// Closes language servers with timeout. The default timeout is 500 ms, use /// Closes language servers with timeout. The default timeout is 10000 ms, use
/// `timeout` parameter to override this. /// `timeout` parameter to override this.
pub async fn close_language_servers( pub async fn close_language_servers(
&self, &self,
timeout: Option<u64>, timeout: Option<u64>,
) -> Result<(), tokio::time::error::Elapsed> { ) -> Result<(), tokio::time::error::Elapsed> {
tokio::time::timeout( tokio::time::timeout(
Duration::from_millis(timeout.unwrap_or(500)), Duration::from_millis(timeout.unwrap_or(10000)),
future::join_all( future::join_all(
self.language_servers self.language_servers
.iter_clients() .iter_clients()

Loading…
Cancel
Save