Skip to content

Commit 75bb17c

Browse files
authored
fix: await session token when watching workspace (#35)
1 parent c99e634 commit 75bb17c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/remote.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ export class Remote {
136136
buildComplete = r
137137
}),
138138
)
139-
this.vscodeProposed.window.showInformationMessage("Starting workspace...")
140139
workspace = {
141140
...workspace,
142141
latest_build: await startWorkspace(workspace.id),
@@ -255,7 +254,7 @@ export class Remote {
255254
const watchURL = new URL(`${this.storage.getURL()}/api/v2/workspaces/${workspace.id}/watch`)
256255
const eventSource = new EventSource(watchURL.toString(), {
257256
headers: {
258-
"Coder-Session-Token": this.storage.getSessionToken(),
257+
"Coder-Session-Token": await this.storage.getSessionToken(),
259258
},
260259
})
261260
eventSource.addEventListener("open", () => {

0 commit comments

Comments
 (0)