1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 12:30:54 +00:00

set default timeout

This commit is contained in:
JessonChan 2015-04-26 16:10:18 +08:00 committed by astaxie
parent d8734cf58d
commit 3bd6caae0a

View File

@ -358,10 +358,10 @@ func (b *BeegoHttpRequest) getResponse() (*http.Response, error) {
trans := b.setting.Transport
if b.setting.ConnectTimeout == 0 {
b.setting.ConnectTimeout = 30 * time.Second
b.setting.ConnectTimeout = 60 * time.Second
}
if b.setting.ReadWriteTimeout == 0 {
b.setting.ReadWriteTimeout = 30 * time.Second
b.setting.ReadWriteTimeout = 60 * time.Second
}
if trans == nil {