mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(codersdk): always dial agents with WorkspaceAgentIP (#8760)
This commit is contained in:
@@ -332,6 +332,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()
|
||||
<-closed
|
||||
|
||||
Reference in New Issue
Block a user