Skip to content

Commit e63df40

Browse files
committed
Remove todo context
1 parent aa37787 commit e63df40

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/workspaceagents.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ func (api *API) workspaceAgentListeningPorts(rw http.ResponseWriter, r *http.Req
404404
}
405405

406406
func (api *API) dialWorkspaceAgentTailnet(r *http.Request, agentID uuid.UUID) (*codersdk.WorkspaceAgentConn, error) {
407+
ctx := r.Context()
407408
clientConn, serverConn := net.Pipe()
408409

409410
derpMap := api.DERPMap.Clone()
@@ -474,7 +475,7 @@ func (api *API) dialWorkspaceAgentTailnet(r *http.Request, agentID uuid.UUID) (*
474475
_ = agentConn.Close()
475476
}
476477
}()
477-
if !agentConn.AwaitReachable(context.TODO()) {
478+
if !agentConn.AwaitReachable(ctx) {
478479
_ = agentConn.Close()
479480
return nil, xerrors.Errorf("agent not reachable")
480481
}

0 commit comments

Comments
 (0)