Introduction
Introduction Statistics Contact Development Disclaimer Help
increase connect timeout - twitch-go - twitch.tv web application in Go
git clone git://git.codemadness.org/twitch-go
Log
Files
Refs
README
LICENSE
---
commit 3801b918ffd3e932a5765c90d93546e609ce5be4
parent 5046e93ea1144424eba2028bc87f804a33c66ce6
Author: Hiltjo Posthuma <[email protected]>
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(-)
---
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)
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 {
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.