d8734cf5 by JessonChan Committed by astaxie

set default timeout

1 parent 51161361
......@@ -357,6 +357,13 @@ func (b *BeegoHttpRequest) getResponse() (*http.Response, error) {
trans := b.setting.Transport
if b.setting.ConnectTimeout == 0 {
b.setting.ConnectTimeout = 30 * time.Second
}
if b.setting.ReadWriteTimeout == 0 {
b.setting.ReadWriteTimeout = 30 * time.Second
}
if trans == nil {
// create default transport
trans = &http.Transport{
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!