Update Yggdrasil demo timeouts again

This commit is contained in:
Neil Alexander 2020-06-11 09:50:54 +01:00
parent 63a24e81c4
commit b7d0ca6855
2 changed files with 7 additions and 5 deletions

View file

@ -79,7 +79,9 @@ func createFederationClient(
tr.RegisterProtocol(
"matrix", &yggroundtripper{
inner: &http.Transport{
DialContext: yggdialerctx,
ResponseHeaderTimeout: 15 * time.Second,
IdleConnTimeout: 60 * time.Second,
DialContext: yggdialerctx,
},
},
)
@ -96,9 +98,9 @@ func main() {
httpServer := &http.Server{
Addr: ":0",
TLSNextProto: map[string]func(*http.Server, *tls.Conn, http.Handler){},
ReadTimeout: 5 * time.Second,
WriteTimeout: 5 * time.Second,
IdleTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second,
WriteTimeout: 45 * time.Second,
IdleTimeout: 60 * time.Second,
BaseContext: func(_ net.Listener) context.Context {
return context.Background()
},