Skip to content

Commit 105c88f

Browse files
committed
fix: use a background context when piping derp connections
This was causing boatloads of connects to reestablish every time... See #6746
1 parent eaacc26 commit 105c88f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/workspaceagents.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ func (api *API) dialWorkspaceAgentTailnet(r *http.Request, agentID uuid.UUID) (*
437437
defer left.Close()
438438
defer right.Close()
439439
brw := bufio.NewReadWriter(bufio.NewReader(right), bufio.NewWriter(right))
440-
api.DERPServer.Accept(ctx, right, brw, r.RemoteAddr)
440+
api.DERPServer.Accept(api.ctx, right, brw, r.RemoteAddr)
441441
}()
442442
return left
443443
})

0 commit comments

Comments
 (0)