Skip to content

Commit 74c4553

Browse files
authored
fix(codersdk): always dial agents with WorkspaceAgentIP (#8760)
1 parent 7b08be8 commit 74c4553

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
@@ -397,6 +397,11 @@ func (c *Client) DialWorkspaceAgent(ctx context.Context, agentID uuid.UUID, opti
397397

398398
agentConn = NewWorkspaceAgentConn(conn, WorkspaceAgentConnOptions{
399399
AgentID: agentID,
400+
// Newer agents will listen on two IPs: WorkspaceAgentIP and an IP
401+
// derived from the agents UUID. We need to use the legacy
402+
// WorkspaceAgentIP here since we don't know if the agent is listening
403+
// on the new IP.
404+
AgentIP: WorkspaceAgentIP,
400405
CloseFunc: func() error {
401406
cancel()
402407
<-closedCoordinator

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