{"record":{"id":"220336b28dc95223","repo":"istio/istio","slug":"context-expired-before-request-sent-v","errorCode":null,"errorMessage":"context expired before request sent: %v","messagePattern":"context expired before request sent: (.+?)","errorType":"exception","errorClass":null,"httpStatus":500,"severity":"error","filePath":"cni/pkg/nodeagent/ztunnelserver_linux.go","lineNumber":174,"sourceCode":"}\n\nfunc (z ztunnelUDSConnection) ReadHello() (*zdsapi.ZdsHello, error) {\n\t// get hello message from ztunnel\n\tm, _, err := readProto[zdsapi.ZdsHello](z.u, readWriteDeadline, nil)\n\treturn m, err\n}\n\nfunc (z ztunnelUDSConnection) Send(ctx context.Context, data *zdsapi.WorkloadRequest, fd *int) (*zdsapi.WorkloadResponse, error) {\n\tret := make(chan updateResponse, 1)\n\treq := updateRequest{\n\t\tupdate: data,\n\t\tfd:     fd,\n\t\tresp:   ret,\n\t}\n\tselect {\n\tcase z.updates <- req:\n\tcase <-ctx.Done():\n\t\treturn nil, fmt.Errorf(\"context expired before request sent: %v\", ctx.Err())\n\tcase <-z.done:\n\t\treturn nil, fmt.Errorf(\"connection closed before request sent\")\n\t}\n\n\tselect {\n\tcase r := <-ret:\n\t\treturn r.resp, r.err\n\tcase <-ctx.Done():\n\t\treturn nil, fmt.Errorf(\"context expired before response received: %v\", ctx.Err())\n\tcase <-z.done:\n\t\treturn nil, fmt.Errorf(\"connection closed before response received\")\n\t}\n}\n\nfunc (z ztunnelUDSConnection) SendMsgAndWaitForAck(msg *zdsapi.WorkloadRequest, fd *int) (*zdsapi.WorkloadResponse, error) {\n\tdata, err := proto.Marshal(msg)\n\tif err != nil {\n\t\treturn nil, err","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/istio/istio/blob/8dc789c5cf17517c64e3c36cb3288230f149dfae/cni/pkg/nodeagent/ztunnelserver_linux.go#L156-L192","documentation":"Error \"context expired before request sent: %v\" thrown in istio/istio.","triggerScenarios":"Thrown at cni/pkg/nodeagent/ztunnelserver_linux.go:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8dc789c5cf17517c64e3c36cb3288230f149dfae","analyzedAt":"2026-08-15T15:16:55.434Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}