Fix typo on http_timeout_sec

This commit is contained in:
Chteufleur 2016-08-15 22:21:50 +02:00
parent e2fbb6c8e3
commit b63a944cb2
3 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ HTTP
* https_port : HTTPS port to bind (default: 9093, desactive: -1) * https_port : HTTPS port to bind (default: 9093, desactive: -1)
* https_cert_path : Path to the certificate file (default: ./cert.pem) * https_cert_path : Path to the certificate file (default: ./cert.pem)
* https_key_path : Path to the key file (default: ./key.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. __Bold config__ are mandatory.

View File

@ -11,4 +11,4 @@ http_port=9090
https_port=9093 https_port=9093
https_cert_path=./cert.pem https_cert_path=./cert.pem
https_key_path=./key.pem https_key_path=./key.pem
http_timeoute_sec=60 http_timeout_sec=60

View File

@ -32,7 +32,7 @@ func init() {
} }
// HTTP config // 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 { if err == nil && httpTimeout > 0 && httpTimeout < http.MaxTimeout {
log.Println("Define HTTP timeout to " + strconv.Itoa(httpTimeout) + " second") log.Println("Define HTTP timeout to " + strconv.Itoa(httpTimeout) + " second")
http.TimeoutSec = httpTimeout http.TimeoutSec = httpTimeout