mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: disable keepalives in workspaceapps transport (#11789)
Connection caching causes requests to hit the wrong workspaces. See comment. Fixes https://github.com/coder/coder/issues/11767
This commit is contained in:
@ -103,7 +103,14 @@ func NewServerTailnet(
|
||||
transport: tailnetTransport.Clone(),
|
||||
}
|
||||
tn.transport.DialContext = tn.dialContext
|
||||
tn.transport.MaxIdleConnsPerHost = 10
|
||||
|
||||
// Bugfix: for some reason all calls to tn.dialContext come from
|
||||
// "localhost", causing connections to be cached and requests to go to the
|
||||
// wrong workspaces. This disables keepalives for now until the root cause
|
||||
// can be found.
|
||||
tn.transport.MaxIdleConnsPerHost = -1
|
||||
tn.transport.DisableKeepAlives = true
|
||||
|
||||
tn.transport.MaxIdleConns = 0
|
||||
// We intentionally don't verify the certificate chain here.
|
||||
// The connection to the workspace is already established and most
|
||||
|
Reference in New Issue
Block a user