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

Commit13beb04

Browse files
authored
fix: disable keepalives in workspaceapps transport (#11789)
Connection caching causes requests to hit the wrong workspaces. Seecomment.Fixes#11767
1 parent1e2634d commit13beb04

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

‎coderd/externalauth/externalauth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ func (c *DeviceAuth) AuthorizeDevice(ctx context.Context) (*codersdk.ExternalAut
347347
casemediaType=="application/x-www-form-urlencoded":
348348
returnnil,xerrors.Errorf("status_code=%d, payload response is form-url encoded, expected a json payload",resp.StatusCode)
349349
default:
350-
returnnil,fmt.Errorf("status_code=%d, mediaType=%s: %w",resp.StatusCode,mediaType,err)
350+
returnnil,xerrors.Errorf("status_code=%d, mediaType=%s: %w",resp.StatusCode,mediaType,err)
351351
}
352352
}
353353
ifr.ErrorDescription!="" {

‎coderd/tailnet.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,14 @@ func NewServerTailnet(
103103
transport:tailnetTransport.Clone(),
104104
}
105105
tn.transport.DialContext=tn.dialContext
106-
tn.transport.MaxIdleConnsPerHost=10
106+
107+
// Bugfix: for some reason all calls to tn.dialContext come from
108+
// "localhost", causing connections to be cached and requests to go to the
109+
// wrong workspaces. This disables keepalives for now until the root cause
110+
// can be found.
111+
tn.transport.MaxIdleConnsPerHost=-1
112+
tn.transport.DisableKeepAlives=true
113+
107114
tn.transport.MaxIdleConns=0
108115
// We intentionally don't verify the certificate chain here.
109116
// The connection to the workspace is already established and most

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp