738e22e3 by JessonChan Committed by astaxie

zero timeout means wait until resp

1 parent 69fc22f0
...@@ -65,14 +65,8 @@ func createDefaultCookie() { ...@@ -65,14 +65,8 @@ func createDefaultCookie() {
65 // Overwrite default settings 65 // Overwrite default settings
66 func SetDefaultSetting(setting BeegoHttpSettings) { 66 func SetDefaultSetting(setting BeegoHttpSettings) {
67 settingMutex.Lock() 67 settingMutex.Lock()
68 defer settingMutex.Unlock()
69 defaultSetting = setting 68 defaultSetting = setting
70 if defaultSetting.ConnectTimeout == 0 { 69 settingMutex.Unlock()
71 defaultSetting.ConnectTimeout = 60 * time.Second
72 }
73 if defaultSetting.ReadWriteTimeout == 0 {
74 defaultSetting.ReadWriteTimeout = 60 * time.Second
75 }
76 } 70 }
77 71
78 // return *BeegoHttpRequest with specific method 72 // return *BeegoHttpRequest with specific method
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!