Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown routine #30

Closed
laughedelic opened this issue Nov 11, 2017 · 4 comments
Closed

Shutdown routine #30

laughedelic opened this issue Nov 11, 2017 · 4 comments
Assignees

Comments

@laughedelic
Copy link
Member

laughedelic commented Nov 11, 2017

I noticed that server responses with an error to the shutdown request:

01:04:47.884 DEBUG l.core.MessageReader - Received headers: Content-Length: 59
01:04:47.884 DEBUG l.core.Connection - Received {"jsonrpc":"2.0","id":14,"method":"shutdown","params":null}
01:04:47.900 DEBUG l.core.MessageWriter - Content-Length: 199
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params","data":{"meaning":"Invalid method parameter(s).","error":{"obj":[{"msg":["command parameters must be given"],"args":[]}]}}},"id":14}
01:04:47.900 DEBUG l.core.MessageWriter - payload: {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params","data":{"meaning":"Invalid method parameter(s).","error":{"obj":[{"msg":["command parameters must be given"],"args":[]}]}}},"id":14}

shutdown request is not supposed to have any parameters, so I think that the underlying LSP library doesn't handle it well.

It causes some extra lags in Atom (atom/atom-languageclient#119) and I suspect after this response server never receives an exit request. By the way, I didn't find how exit is handled in the server.

@gabro
Copy link
Member

gabro commented Nov 11, 2017

I'm almost done in switching to lsp4j, which is a much more completed and tested implementation.

I hope all this issues with the protocol bindings are going away very soon.

@laughedelic
Copy link
Member Author

OK, cool

@gabro
Copy link
Member

gabro commented Nov 14, 2017

lsp4j is not on the table anymore, let's fix this.

@gabro gabro added the defect label Nov 21, 2017
@laughedelic
Copy link
Member Author

laughedelic commented Nov 23, 2017

@gabro let me know if you have started with this. Otherwise I'll try to fix it.

VS Code does a trick by killing server process if it didn't reply to shutdown request in 5 sec. Atom doesn't, so every time I restart a server I have some zombie processes that I have to kill manually
💀🔫

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants