docs - Add comments for grpc client handleConnectError (#1565)

This commit is contained in:
Jiaming 2024-08-07 16:17:30 +08:00 коммит произвёл GitHub
Родитель a281e6b319
Коммит 8fbe26c496
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -388,6 +388,13 @@ export class TaskServerClient implements vscode.Disposable {
logger.info("Build cancelled:", cancelled.getMessage());
};
/**
* This is called when there is an error connecting to the Task server which uses GRPC.
* If Task server is down, it means that the whole Gradle server is not running.
* So here if the server is not ready, we should restart the gradle server.
* If gradle server is ready, it implies that GRPC server is up but the grpc client was unable to connect.
* @param e GRPC connection error
*/
private handleConnectError = async (e: Error): Promise<void> => {
logger.error("Error connecting to gradle server:", e.message);
this.close();