Skip to content

Commit 201ac99

Browse files
committed
fix(codersdk): always dial agents with WorkspaceAgentIP (#8760)
1 parent 65583ec commit 201ac99

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

codersdk/workspaceagents.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ func (c *Client) DialWorkspaceAgent(ctx context.Context, agentID uuid.UUID, opti
332332

333333
agentConn = NewWorkspaceAgentConn(conn, WorkspaceAgentConnOptions{
334334
AgentID: agentID,
335+
// Newer agents will listen on two IPs: WorkspaceAgentIP and an IP
336+
// derived from the agents UUID. We need to use the legacy
337+
// WorkspaceAgentIP here since we don't know if the agent is listening
338+
// on the new IP.
339+
AgentIP: WorkspaceAgentIP,
335340
CloseFunc: func() error {
336341
cancel()
337342
<-closed

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy