🐛 fix: config file loading error

This commit is contained in:
Martial BE
2024-04-18 23:10:47 +08:00
parent 303fe3360b
commit 0c5ad810a9
11 changed files with 25 additions and 36 deletions

View File

@@ -74,7 +74,7 @@ func InitHttpClient() {
Transport: trans,
}
relayTimeout := common.GetOrDefault("RELAY_TIMEOUT", 600)
relayTimeout := common.GetOrDefault("connect_timeout", 600)
if relayTimeout != 0 {
HTTPClient.Timeout = time.Duration(relayTimeout) * time.Second
}

View File

@@ -14,7 +14,7 @@ import (
func GetWSClient(proxyAddr string) *websocket.Dialer {
dialer := &websocket.Dialer{
HandshakeTimeout: time.Duration(common.GetOrDefault("CONNECT_TIMEOUT", 5)) * time.Second,
HandshakeTimeout: time.Duration(common.GetOrDefault("connect_timeout", 5)) * time.Second,
}
if proxyAddr != "" {