Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit242a517

Browse files
authored
Recreate REST client after starting a workspace (#431)
1 parent9253a22 commit242a517

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

‎CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
##Unreleased
44

5+
- Recreate REST client after starting a workspace to ensure fresh TLS certificates.
6+
57
##[v1.3.10](https://github.com/coder/vscode-coder/releases/tag/v1.3.9) (2025-01-17)
68

79
- Fix bug where checking for overridden properties incorrectly converted host name pattern to regular expression.

‎src/remote.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ export class Remote {
5656
label:string,
5757
binPath:string,
5858
):Promise<Workspace|undefined>{
59-
// Maybe already running?
60-
if(workspace.latest_build.status==="running"){
61-
returnworkspace
62-
}
63-
6459
constworkspaceName=`${workspace.owner_name}/${workspace.name}`
6560

6661
// A terminal will be used to stream the build, if one is necessary.
@@ -320,13 +315,19 @@ export class Remote {
320315
disposables.push(this.registerLabelFormatter(remoteAuthority,workspace.owner_name,workspace.name))
321316

322317
// If the workspace is not in a running state, try to get it running.
323-
constupdatedWorkspace=awaitthis.maybeWaitForRunning(workspaceRestClient,workspace,parts.label,binaryPath)
324-
if(!updatedWorkspace){
325-
// User declined to start the workspace.
326-
awaitthis.closeRemote()
318+
if(workspace.latest_build.status!=="running"){
319+
if(!(awaitthis.maybeWaitForRunning(workspaceRestClient,workspace,parts.label,binaryPath))){
320+
// User declined to start the workspace.
321+
awaitthis.closeRemote()
322+
}else{
323+
// Start over with a fresh REST client because we may have waited an
324+
// indeterminate amount amount of time for confirmation to start the
325+
// workspace.
326+
awaitthis.setup(remoteAuthority)
327+
}
327328
return
328329
}
329-
this.commands.workspace=workspace=updatedWorkspace
330+
this.commands.workspace=workspace
330331

331332
// Pick an agent.
332333
this.storage.writeToCoderOutputChannel(`Finding agent for${workspaceName}...`)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp