Fix ruff server hanging after Neovim closes (#11291)

## Summary

A follow-up to https://github.com/astral-sh/ruff/pull/11222. `ruff
server` stalls during shutdown with Neovim because after it receives an
exit notification and closes the I/O thread, it attempts to log a
success message to `stderr`. Removing this log statement fixes this
issue.

## Test Plan

Track the instances of `ruff` in the OS task manager as you open and
close Neovim. A new instance should appear when Neovim starts and it
should disappear once Neovim is closed.
This commit is contained in:
Jane Lewis 2024-05-05 10:15:48 -07:00 committed by GitHub
parent c3e0306c9d
commit a8a97291d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -114,9 +114,6 @@ impl Server {
self.worker_threads, self.worker_threads,
)?; )?;
self.connection.close()?; self.connection.close()?;
// Note: when we start routing tracing through the LSP,
// this should be replaced with a log directly to `stderr`.
tracing::info!("Server has shut down successfully");
Ok(()) Ok(())
})? })?
.join() .join()