mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 00:50:54 +00:00
zero timeout means wait until resp
This commit is contained in:
parent
0c1bb6409a
commit
da8c3c3910
@ -65,14 +65,8 @@ func createDefaultCookie() {
|
|||||||
// Overwrite default settings
|
// Overwrite default settings
|
||||||
func SetDefaultSetting(setting BeegoHttpSettings) {
|
func SetDefaultSetting(setting BeegoHttpSettings) {
|
||||||
settingMutex.Lock()
|
settingMutex.Lock()
|
||||||
defer settingMutex.Unlock()
|
|
||||||
defaultSetting = setting
|
defaultSetting = setting
|
||||||
if defaultSetting.ConnectTimeout == 0 {
|
settingMutex.Unlock()
|
||||||
defaultSetting.ConnectTimeout = 60 * time.Second
|
|
||||||
}
|
|
||||||
if defaultSetting.ReadWriteTimeout == 0 {
|
|
||||||
defaultSetting.ReadWriteTimeout = 60 * time.Second
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// return *BeegoHttpRequest with specific method
|
// return *BeegoHttpRequest with specific method
|
||||||
|
Loading…
Reference in New Issue
Block a user