fix(laya): extend shared CPU ranking timeout

This commit is contained in:
2026-11-23 20:39:37 +01:00
parent cb06d3432a
commit bf7f94bc80
8 changed files with 100 additions and 9 deletions

View File

@ -42,9 +42,9 @@ func NewLayaHTTPRanker(cfg LayaHTTPConfig) (*LayaHTTPRanker, error) {
return nil, errors.New("laya: invalid base URL")
}
if cfg.Timeout == 0 {
cfg.Timeout = 120 * time.Second
cfg.Timeout = 5 * time.Minute
}
if cfg.Timeout < 0 {
if cfg.Timeout < 0 || cfg.Timeout > 10*time.Minute {
return nil, errors.New("laya: invalid timeout")
}
if cfg.BatchSize == 0 {