|
@@ -104,7 +104,6 @@ type config struct {
|
|
var conf = config{
|
|
var conf = config{
|
|
Bind: ":8080",
|
|
Bind: ":8080",
|
|
ReadTimeout: 10,
|
|
ReadTimeout: 10,
|
|
- WaitTimeout: 10,
|
|
|
|
WriteTimeout: 10,
|
|
WriteTimeout: 10,
|
|
DownloadTimeout: 5,
|
|
DownloadTimeout: 5,
|
|
Concurrency: runtime.NumCPU() * 2,
|
|
Concurrency: runtime.NumCPU() * 2,
|
|
@@ -127,7 +126,6 @@ func init() {
|
|
|
|
|
|
strEnvConfig(&conf.Bind, "IMGPROXY_BIND")
|
|
strEnvConfig(&conf.Bind, "IMGPROXY_BIND")
|
|
intEnvConfig(&conf.ReadTimeout, "IMGPROXY_READ_TIMEOUT")
|
|
intEnvConfig(&conf.ReadTimeout, "IMGPROXY_READ_TIMEOUT")
|
|
- intEnvConfig(&conf.WaitTimeout, "IMGPROXY_WAIT_TIMEOUT")
|
|
|
|
intEnvConfig(&conf.WriteTimeout, "IMGPROXY_WRITE_TIMEOUT")
|
|
intEnvConfig(&conf.WriteTimeout, "IMGPROXY_WRITE_TIMEOUT")
|
|
intEnvConfig(&conf.DownloadTimeout, "IMGPROXY_DOWNLOAD_TIMEOUT")
|
|
intEnvConfig(&conf.DownloadTimeout, "IMGPROXY_DOWNLOAD_TIMEOUT")
|
|
intEnvConfig(&conf.Concurrency, "IMGPROXY_CONCURRENCY")
|
|
intEnvConfig(&conf.Concurrency, "IMGPROXY_CONCURRENCY")
|
|
@@ -168,10 +166,6 @@ func init() {
|
|
log.Fatalf("Read timeout should be greater than 0, now - %d\n", conf.ReadTimeout)
|
|
log.Fatalf("Read timeout should be greater than 0, now - %d\n", conf.ReadTimeout)
|
|
}
|
|
}
|
|
|
|
|
|
- if conf.WaitTimeout <= 0 {
|
|
|
|
- log.Fatalf("Wait timeout should be greater than 0, now - %d\n", conf.WaitTimeout)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if conf.WriteTimeout <= 0 {
|
|
if conf.WriteTimeout <= 0 {
|
|
log.Fatalf("Write timeout should be greater than 0, now - %d\n", conf.WriteTimeout)
|
|
log.Fatalf("Write timeout should be greater than 0, now - %d\n", conf.WriteTimeout)
|
|
}
|
|
}
|