Skip to content

Commit 3b067e0

Browse files
feat(config): read write timeout value
This commit adds a write timeout configuration parameter. As it is part of the downloading cycle, it is available under `blocking/loading/downloads`. The default value comes from `server/http.go` line 23. Refs: 0xERR0R#1606
1 parent aff2998 commit 3b067e0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

config/config.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,10 @@ func recoverToError(do func(context.Context) error, onPanic func(any) error) fun
405405
}
406406

407407
type Downloader struct {
408-
Timeout Duration `yaml:"timeout" default:"5s"`
409-
Attempts uint `yaml:"attempts" default:"3"`
410-
Cooldown Duration `yaml:"cooldown" default:"500ms"`
408+
Timeout Duration `yaml:"timeout" default:"5s"`
409+
WriteTimeout Duration `yaml:"writeTimeout" default:"20s"`
410+
Attempts uint `yaml:"attempts" default:"3"`
411+
Cooldown Duration `yaml:"cooldown" default:"500ms"`
411412
}
412413

413414
func (c *Downloader) LogConfig(logger *logrus.Entry) {

0 commit comments

Comments
 (0)