File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import (
1717 "go.uber.org/zap"
1818)
1919
20- const DefaultTimeout time.Duration = 5 * time .Second
20+ const DefaultTimeout time.Duration = 10 * time .Second
2121
2222// Master struct/object
2323type Client struct {
@@ -135,8 +135,6 @@ func (c *ClientConfig) Build() (*Client, error) {
135135 )
136136 }
137137
138-
139-
140138 client := & Client {
141139 Integration : & c .Integration ,
142140 http : & httpClient ,
Original file line number Diff line number Diff line change @@ -7,9 +7,16 @@ import (
77
88var mu sync.Mutex
99
10- // Modifies the HTTP timeout time
10+ // Amends the HTTP timeout time
1111func (c * Client ) ModifyHttpTimeout (newTimeout time.Duration ) {
1212 mu .Lock ()
1313 defer mu .Unlock ()
1414 c .http .Timeout = newTimeout
1515}
16+
17+ // Resets HTTP timeout time back to 10 seconds
18+ func (c * Client ) ResetTimeout () {
19+ mu .Lock ()
20+ defer mu .Unlock ()
21+ c .http .Timeout = DefaultTimeout
22+ }
You can’t perform that action at this time.
0 commit comments