fix(codersdk): always dial agents with WorkspaceAgentIP (#8760)

This commit is contained in:
Colin Adler
2023-07-27 03:44:44 +00:00
committed by GitHub
parent 7b08be8000
commit 74c4553a3f
+5
View File
@@ -397,6 +397,11 @@ func (c *Client) DialWorkspaceAgent(ctx context.Context, agentID uuid.UUID, opti
agentConn = NewWorkspaceAgentConn(conn, WorkspaceAgentConnOptions{
AgentID: agentID,
// Newer agents will listen on two IPs: WorkspaceAgentIP and an IP
// derived from the agents UUID. We need to use the legacy
// WorkspaceAgentIP here since we don't know if the agent is listening
// on the new IP.
AgentIP: WorkspaceAgentIP,
CloseFunc: func() error {
cancel()
<-closedCoordinator