Error [ERR_STREAM_WRITE_AFTER_END] occurs after client.stop()
After the update to the vscode client v7.0.0 and change to the ownership of the socket, the following error occurs after a client.stop() call:
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 Socket.write (internal/streams/writable.js:292:11)
at c:\Users\au543131\Documents\Github\vdm-vscode\dist\extension.js:25155:29
at new Promise (
I have not been able to identify if the error is caused by us or it is a bug in vscode, but it might be related to this issue: https://github.com/microsoft/vscode-languageserver-node/issues/755. If so the error will probably disappear when we update to the next client version.
The easiest way to reproduce without changing the project is to open a multi-root workspace, activate the extension by opening a vdm file, then remove the folder containing that file from the workspace.