From d10a270967c279944ecdf8803168a09f309c2d74 Mon Sep 17 00:00:00 2001 From: sockmaster27 <61235930+sockmaster27@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:32:43 +0200 Subject: [PATCH] refactor: remove unnecessary await --- client/src/handlers/handlers.ts | 5 +---- server/src/handlers/handlers.ts | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/client/src/handlers/handlers.ts b/client/src/handlers/handlers.ts index 12ab76cd..39764c83 100644 --- a/client/src/handlers/handlers.ts +++ b/client/src/handlers/handlers.ts @@ -15,10 +15,7 @@ let flixTerminal: vscode.Terminal | null = null * Used for testing purposes. */ export function simulateDisconnect(client: LanguageClient) { - return async () => { - client.sendNotification(jobs.Request.apiDisconnect) - await new Promise(r => client.onNotification(jobs.Request.internalReady, r)) - } + return () => client.sendNotification(jobs.Request.apiDisconnect) } export function makeHandleRunJob(client: LanguageClient, request: jobs.Request) { diff --git a/server/src/handlers/handlers.ts b/server/src/handlers/handlers.ts index 64d577ee..2b1dea97 100644 --- a/server/src/handlers/handlers.ts +++ b/server/src/handlers/handlers.ts @@ -92,7 +92,7 @@ export function handleReplaceConfiguration(userConfiguration: engine.UserConfigu } /** - * Simulates the language server disconnecting. To await reconnection, listen for the {@linkcode jobs.Request.internalReady} on the client side. + * Simulates the language server disconnecting. * Used for testing. */ export function handleDisconnect() {