Skip to content

Commit 74fcdcd

Browse files
committed
chore: tighten timeout constant comment
1 parent 5c6124e commit 74fcdcd

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
from published versions since it shows up in the VS Code extension changelog
66
tab and is confusing to users. Add it back between releases if needed. -->
77

8+
## Unreleased
9+
10+
### Fixed
11+
12+
- Apply a 60-second default timeout to REST requests, so requests hung on a
13+
half-open TCP connection don't stall pollers forever.
14+
815
## [v1.15.2](https://github.com/coder/vscode-coder/releases/tag/v1.15.2) 2026-06-30
916

1017
> **Breaking:** API requests now respect `http.proxySupport: off`. Previously

src/api/coderApi.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,10 @@ import type {
7171
const coderSessionTokenHeader = "Coder-Session-Token";
7272

7373
/**
74-
* Default timeout for REST requests. Prevents requests from hanging
75-
* forever on half-open TCP connections (e.g. after system sleep or a
76-
* network drop), which would otherwise silently kill pollers that only
77-
* reschedule after the previous request settles.
78-
*
79-
* For streaming responses (`responseType: "stream"`, e.g. SSE and the
80-
* CLI binary download) axios only enforces this until response headers
81-
* arrive; it never aborts an in-flight stream body.
74+
* Default timeout for REST requests, so requests hung on half-open TCP
75+
* connections (e.g. after system sleep) don't stall pollers forever.
76+
* Streaming responses are only bounded until response headers arrive;
77+
* axios never aborts an in-flight stream body.
8278
*/
8379
export const DEFAULT_REQUEST_TIMEOUT_MS = 60_000;
8480

0 commit comments

Comments
 (0)