修改流式响应的超时时间

This commit is contained in:
Yun
2025-01-07 13:53:36 +08:00
parent 566d0b7b51
commit aa0e094851
+1 -1
View File
@@ -315,7 +315,7 @@ func (c *Curlx) SendStream(ctx context.Context, ps ...Param) (<-chan string, err
go func() { go func() {
defer close(data) defer close(data)
ctx, cancel := context.WithTimeout(context.Background(), time.Minute*30) ctx, cancel := context.WithTimeout(context.Background(), c.opts.TimeOut)
defer cancel() defer cancel()
_, response, err := c.SendExec(ctx, ps...) _, response, err := c.SendExec(ctx, ps...)