Skip to content

Override connect timeout #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
lint
Could have sworn I ran this.
  • Loading branch information
code-asher committed Jan 30, 2024
commit 8ff655c9d87d20c860e681e9b75db94aed6220ac
9 changes: 4 additions & 5 deletions src/remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ export class Remote {
const remotePlatforms = this.vscodeProposed.workspace
.getConfiguration()
.get<Record<string, string>>("remote.SSH.remotePlatform", {})
const connTimeout = this.vscodeProposed.workspace.getConfiguration().get<number | undefined>("remote.SSH.connectTimeout")
const connTimeout = this.vscodeProposed.workspace
.getConfiguration()
.get<number | undefined>("remote.SSH.connectTimeout")

// We have to directly munge the settings file with jsonc because trying to
// update properly through the extension API hangs indefinitely. Possibly
Expand Down Expand Up @@ -471,10 +473,7 @@ export class Remote {
try {
await fs.writeFile(
this.storage.getUserSettingsPath(),
jsonc.applyEdits(
rawSettings,
jsonc.modify(rawSettings, ["remote.SSH.connectTimeout"], connTimeout, {}),
),
jsonc.applyEdits(rawSettings, jsonc.modify(rawSettings, ["remote.SSH.connectTimeout"], connTimeout, {})),
)
} catch (error) {
this.storage.writeToCoderOutputChannel(
Expand Down