From b7d0ca68554a41c4ca04370fc9343fc4b2b99257 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 11 Jun 2020 09:50:54 +0100 Subject: [PATCH] Update Yggdrasil demo timeouts again --- cmd/dendrite-demo-yggdrasil/main.go | 10 ++++++---- cmd/dendrite-demo-yggdrasil/yggconn/session.go | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/dendrite-demo-yggdrasil/main.go b/cmd/dendrite-demo-yggdrasil/main.go index 8bf1f7561..b1530e883 100644 --- a/cmd/dendrite-demo-yggdrasil/main.go +++ b/cmd/dendrite-demo-yggdrasil/main.go @@ -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() }, diff --git a/cmd/dendrite-demo-yggdrasil/yggconn/session.go b/cmd/dendrite-demo-yggdrasil/yggconn/session.go index 32ae014a0..8d96a9cbc 100644 --- a/cmd/dendrite-demo-yggdrasil/yggconn/session.go +++ b/cmd/dendrite-demo-yggdrasil/yggconn/session.go @@ -26,7 +26,7 @@ import ( func (n *Node) yamuxConfig() *yamux.Config { cfg := yamux.DefaultConfig() cfg.EnableKeepAlive = false - cfg.ConnectionWriteTimeout = time.Second * 5 + cfg.ConnectionWriteTimeout = time.Second * 15 cfg.MaxMessageSize = 65535 cfg.ReadBufSize = 655350 return cfg