Skip to content

Syntax server no longer exits once JDT server is initialized #1928

Description

@rgrunber

Using vscode-java 0.79.0 or newer, and running watch -n1 -d 'jps -l | grep -v jps' in some terminal, I noticed that the syntax server no longer exits once the language server has completed its startup.

Environment

Linux (Fedora 33)
VS Code 1.55.2

This seems to have started happening with #1894 ( 9f32875 ) , but I don't think we do anything with the exit logic. Is there a chance this is a bug in that library ?

  • shutdown() is sent by client, and syntax server responds by saving the workspace
  • client confirms it received a response from shutdown
  • client then sends an exit() request to server
  • the SyntaxLanguageServer.exit() on the server side never gets called by the client

Instead, all I see is the following show up in the errors :

rejected promise not handled within 1 second: Error [ERR_STREAM_WRITE_AFTER_END]: write after end
stack trace: Error [ERR_STREAM_WRITE_AFTER_END]: write after end
    at writeAfterEnd (_stream_writable.js:266:14)
    at Socket.write (_stream_writable.js:315:5)
    at /home/rgrunber/git/vscode-java/dist/extension.js:2:882887
    at new Promise (<anonymous>)
    at c.write (/home/rgrunber/git/vscode-java/dist/extension.js:2:882805)
    at _.doWrite (/home/rgrunber/git/vscode-java/dist/extension.js:2:872391)
    at /home/rgrunber/git/vscode-java/dist/extension.js:2:872286

Debugging this I see it happens for the following data :
'Content-Length: 33\r\n\r\n'
{"jsonrpc":"2.0","method":"exit"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions