Description
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.