ebkalderon / tower-lsp

Language Server Protocol implementation written in Rust
Apache License 2.0
1k stars 55 forks source link

"exit" notification doesn't seem to be correctly handled #424

Open VladimirMakaev opened 1 month ago

VladimirMakaev commented 1 month ago

When server receives "exit" notification it should exit from Server::new(stdin, stdout, socket).serve(service).await call however it doesn't seem to be happening in the testing I'm doing

To repro you can run a server from example and send "initialize", "initialized", "shutdown", "exit" to it. What happens internally is that server keeps receiving messages and serve never exits. The server does enter "Exited" state and I can see in trace message below if I send a follow up request to the server:

 ERROR tower_lsp::transport: language server has exited

It's also impossible to know that "exit" was received from the API surface