mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-16 21:23:44 +08:00
🐛 fix: config file loading error
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 != "" {
|
||||
|
||||
Reference in New Issue
Block a user