Commit d8734cf5 authored by JessonChan's avatar JessonChan Committed by astaxie

set default timeout

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{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment