increase connect timeout - twitch-go - twitch.tv web application in Go
(HTM) git clone git://git.codemadness.org/twitch-go
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 3801b918ffd3e932a5765c90d93546e609ce5be4
(DIR) parent 5046e93ea1144424eba2028bc87f804a33c66ce6
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 4 Feb 2019 20:15:55 +0100
increase connect timeout
Diffstat:
M main.go | 4 ++--
M src/twitch/twitch.go | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/main.go b/main.go
@@ -280,8 +280,8 @@ func main() {
}))
s := &http.Server{
- ReadTimeout: 10 * time.Second,
- WriteTimeout: 10 * time.Second,
+ ReadTimeout: 30 * time.Second,
+ WriteTimeout: 30 * time.Second,
MaxHeaderBytes: 1 << 20,
}
s.Serve(l)
(DIR) diff --git a/src/twitch/twitch.go b/src/twitch/twitch.go
@@ -104,7 +104,7 @@ type Games struct {
func ReadAllUrl(url string) ([]byte, error) {
client := http.Client{
- Timeout: time.Duration(10) * time.Second,
+ Timeout: time.Duration(30) * time.Second,
}
req, err := http.NewRequest("GET", url, nil)
if err != nil {