diff --git a/sysmodule/httpclientmodule/httpclientpoolmodule.go b/sysmodule/httpclientmodule/httpclientpoolmodule.go index 09fe7a2..76834ba 100644 --- a/sysmodule/httpclientmodule/httpclientpoolmodule.go +++ b/sysmodule/httpclientmodule/httpclientpoolmodule.go @@ -64,9 +64,14 @@ func (slf *HttpClientModule) Init(maxpool int, proxyUrl string) { Proxy: proxyfun, TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, }, + Timeout: 5 * time.Second, } } +func (slf *HttpClientModule) SetTimeOut(value time.Duration) { + slf.client.Timeout = value +} + func (slf *HttpClientModule) SyncRequest(method string, url string, body []byte, header http.Header) SyncHttpRespone { ret := SyncHttpRespone{ resp: make(chan HttpRespone, 1),