8000 Client: duplicate messages sent after server restart · Issue #342 · microsoft/vscode-languageserver-node · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Client: duplicate messages sent after server restart #342
Closed
@nrc

Description

@nrc

STR: start an extension with a language server (I use the Rust Language Server but I believe any extension/language server would do). Kill the language server process. The client restarts the server (as it should), but now every message (notification or request) is duplicated. If you kill the server again, you get three of each message, and so forth.

From looking at the source code for the client, it looks to me that when the client restarts the server it should properly cleanup the connection, but does not (so handlers are not removed). The connection is re-initialized, but by calling onRequest, onNotification, etc. the client is installing extra copies of the handlers into the connection, not replacing the previous handlers. So, when a message is sent to the connection it is dispatched multiple times to the server.

cc microsoft/vscode#48309

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0