fix(entitysource): rate limiter applied to nil reader (#2834)

This commit is contained in:
Aaron Liu
2025-08-26 11:30:55 +08:00
parent a095117061
commit a16b491f65
2 changed files with 2 additions and 2 deletions

View File

@@ -670,7 +670,7 @@ func (f *entitySource) getRsc(pos int64) (io.ReadCloser, error) {
if f.o.SpeedLimit > 0 {
bucket := ratelimit.NewBucketWithRate(float64(f.o.SpeedLimit), f.o.SpeedLimit)
return lrs{f.rsc, ratelimit.Reader(f.rsc, bucket)}, nil
return lrs{file, ratelimit.Reader(file, bucket)}, nil
} else {
return file, nil
}