Skip to content

Add a way for the server to notify the client that it is shutting down #252

@smarter

Description

@smarter

Suppose that the server encounters a fatal error, if it simply exits, the client has no information on whether it makes sense to restart the server or not so has to resort to heuristics (e.g. for vscode-languageclient: "The default strategy restart the server unless it crashed 5 times or more in the last 3 minutes."). But in many situations, the server may know whether a restart might help or not, and could communicate this to the client, the closest we have in the protocol currently is:

interface InitializeError {
	/**
	 * Indicates whether the client execute the following retry logic:
	 * (1) show the message provided by the ResponseError to the user
	 * (2) user selects retry or cancel
	 * (3) if user selected retry the initialize method is sent again.
	 */
	retry: boolean;
}

But this can only be used in response to initialize, whereas errors could happen at any point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions