Skip to content

Commit d7fd4ac

Browse files
committed
Do not reset timeout
The problem is that the timeout will not apply to reconnects.
1 parent 396d05d commit d7fd4ac

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/remote.ts

+1-17
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ export class Remote {
334334
// write here is not necessarily catastrophic since the user will be
335335
// asked for the platform and the default timeout might be sufficient.
336336
mungedPlatforms = mungedConnTimeout = false
337+
this.storage.writeToCoderOutputChannel(`Failed to configure settings: ${ex}`)
337338
}
338339
}
339340

@@ -485,23 +486,6 @@ export class Remote {
485486
}
486487

487488
this.findSSHProcessID().then((pid) => {
488-
// Once the SSH process has spawned we can reset the timeout.
489-
if (mungedConnTimeout) {
490-
// Re-read settings in case they changed.
491-
fs.readFile(this.storage.getUserSettingsPath(), "utf8").then(async (rawSettings) => {
492-
try {
493-
await fs.writeFile(
494-
this.storage.getUserSettingsPath(),
495-
jsonc.applyEdits(rawSettings, jsonc.modify(rawSettings, ["remote.SSH.connectTimeout"], connTimeout, {})),
496-
)
497-
} catch (error) {
498-
this.storage.writeToCoderOutputChannel(
499-
`Failed to reset remote.SSH.connectTimeout back to ${connTimeout}: ${error}`,
500-
)
501-
}
502-
})
503-
}
504-
505489
if (!pid) {
506490
// TODO: Show an error here!
507491
return

0 commit comments

Comments
 (0)