1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 20:10:55 +00:00

zero timeout means wait until resp

This commit is contained in:
JessonChan 2015-04-26 02:17:46 +08:00
parent 0c1bb6409a
commit da8c3c3910

View File

@ -65,14 +65,8 @@ func createDefaultCookie() {
// Overwrite default settings
func SetDefaultSetting(setting BeegoHttpSettings) {
settingMutex.Lock()
defer settingMutex.Unlock()
defaultSetting = setting
if defaultSetting.ConnectTimeout == 0 {
defaultSetting.ConnectTimeout = 60 * time.Second
}
if defaultSetting.ReadWriteTimeout == 0 {
defaultSetting.ReadWriteTimeout = 60 * time.Second
}
settingMutex.Unlock()
}
// return *BeegoHttpRequest with specific method