Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6013efec39 |
+1
-6
@@ -94,7 +94,6 @@ type RuntimeObject struct {
|
||||
IgnoreSSL *bool `json:"ignoreSSL" xml:"ignoreSSL"`
|
||||
ReadTimeout *int `json:"readTimeout" xml:"readTimeout"`
|
||||
ConnectTimeout *int `json:"connectTimeout" xml:"connectTimeout"`
|
||||
IdleTimeout *int `json:"idleTimeout" xml:"idleTimeout"`
|
||||
LocalAddr *string `json:"localAddr" xml:"localAddr"`
|
||||
HttpProxy *string `json:"httpProxy" xml:"httpProxy"`
|
||||
HttpsProxy *string `json:"httpsProxy" xml:"httpsProxy"`
|
||||
@@ -115,7 +114,7 @@ type RuntimeObject struct {
|
||||
|
||||
func (r *RuntimeObject) getClientTag(domain string) string {
|
||||
return strconv.FormatBool(BoolValue(r.IgnoreSSL)) + strconv.Itoa(IntValue(r.ReadTimeout)) +
|
||||
strconv.Itoa(IntValue(r.ConnectTimeout)) + strconv.Itoa(IntValue(r.IdleTimeout)) + StringValue(r.LocalAddr) + StringValue(r.HttpProxy) +
|
||||
strconv.Itoa(IntValue(r.ConnectTimeout)) + StringValue(r.LocalAddr) + StringValue(r.HttpProxy) +
|
||||
StringValue(r.HttpsProxy) + StringValue(r.NoProxy) + StringValue(r.Socks5Proxy) + StringValue(r.Socks5NetWork) + domain
|
||||
}
|
||||
|
||||
@@ -129,7 +128,6 @@ func NewRuntimeObject(runtime map[string]interface{}) *RuntimeObject {
|
||||
IgnoreSSL: TransInterfaceToBool(runtime["ignoreSSL"]),
|
||||
ReadTimeout: TransInterfaceToInt(runtime["readTimeout"]),
|
||||
ConnectTimeout: TransInterfaceToInt(runtime["connectTimeout"]),
|
||||
IdleTimeout: TransInterfaceToInt(runtime["idleTimeout"]),
|
||||
LocalAddr: TransInterfaceToString(runtime["localAddr"]),
|
||||
HttpProxy: TransInterfaceToString(runtime["httpProxy"]),
|
||||
HttpsProxy: TransInterfaceToString(runtime["httpsProxy"]),
|
||||
@@ -575,9 +573,6 @@ func getHttpTransport(req *Request, runtime *RuntimeObject) (*http.Transport, er
|
||||
trans.MaxIdleConns = IntValue(runtime.MaxIdleConns)
|
||||
trans.MaxIdleConnsPerHost = IntValue(runtime.MaxIdleConns)
|
||||
}
|
||||
if runtime.IdleTimeout != nil && *runtime.IdleTimeout > 0 {
|
||||
trans.IdleConnTimeout = time.Duration(IntValue(runtime.IdleTimeout)) * time.Millisecond
|
||||
}
|
||||
return trans, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user