Fix typo on http_timeout_sec
This commit is contained in:
parent
e2fbb6c8e3
commit
b63a944cb2
|
|
@ -40,7 +40,7 @@ HTTP
|
|||
* https_port : HTTPS port to bind (default: 9093, desactive: -1)
|
||||
* https_cert_path : Path to the certificate file (default: ./cert.pem)
|
||||
* https_key_path : Path to the key file (default: ./key.pem)
|
||||
* http_timeoute_sec : Define a timeout if user did not give an answer to the request (default: 60)
|
||||
* http_timeout_sec : Define a timeout if user did not give an answer to the request (default: 60)
|
||||
|
||||
__Bold config__ are mandatory.
|
||||
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ http_port=9090
|
|||
https_port=9093
|
||||
https_cert_path=./cert.pem
|
||||
https_key_path=./key.pem
|
||||
http_timeoute_sec=60
|
||||
http_timeout_sec=60
|
||||
|
|
|
|||
2
main.go
2
main.go
|
|
@ -32,7 +32,7 @@ func init() {
|
|||
}
|
||||
|
||||
// HTTP config
|
||||
httpTimeout, err := strconv.Atoi(mapConfig["http_timeoute_sec"])
|
||||
httpTimeout, err := strconv.Atoi(mapConfig["http_timeout_sec"])
|
||||
if err == nil && httpTimeout > 0 && httpTimeout < http.MaxTimeout {
|
||||
log.Println("Define HTTP timeout to " + strconv.Itoa(httpTimeout) + " second")
|
||||
http.TimeoutSec = httpTimeout
|
||||
|
|
|
|||
Loading…
Reference in New Issue