Skip to content

Commit

Permalink
refactor: remove unnecessary await
Browse files Browse the repository at this point in the history
  • Loading branch information
sockmaster27 committed Apr 10, 2024
1 parent 5919a92 commit d10a270
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions client/src/handlers/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion server/src/handlers/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit d10a270

Please sign in to comment.