Update Yggdrasil demo timeouts again
parent
63a24e81c4
commit
b7d0ca6855
|
@ -79,6 +79,8 @@ func createFederationClient(
|
||||||
tr.RegisterProtocol(
|
tr.RegisterProtocol(
|
||||||
"matrix", &yggroundtripper{
|
"matrix", &yggroundtripper{
|
||||||
inner: &http.Transport{
|
inner: &http.Transport{
|
||||||
|
ResponseHeaderTimeout: 15 * time.Second,
|
||||||
|
IdleConnTimeout: 60 * time.Second,
|
||||||
DialContext: yggdialerctx,
|
DialContext: yggdialerctx,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -96,9 +98,9 @@ func main() {
|
||||||
httpServer := &http.Server{
|
httpServer := &http.Server{
|
||||||
Addr: ":0",
|
Addr: ":0",
|
||||||
TLSNextProto: map[string]func(*http.Server, *tls.Conn, http.Handler){},
|
TLSNextProto: map[string]func(*http.Server, *tls.Conn, http.Handler){},
|
||||||
ReadTimeout: 5 * time.Second,
|
ReadTimeout: 15 * time.Second,
|
||||||
WriteTimeout: 5 * time.Second,
|
WriteTimeout: 45 * time.Second,
|
||||||
IdleTimeout: 15 * time.Second,
|
IdleTimeout: 60 * time.Second,
|
||||||
BaseContext: func(_ net.Listener) context.Context {
|
BaseContext: func(_ net.Listener) context.Context {
|
||||||
return context.Background()
|
return context.Background()
|
||||||
},
|
},
|
||||||
|
|
|
@ -26,7 +26,7 @@ import (
|
||||||
func (n *Node) yamuxConfig() *yamux.Config {
|
func (n *Node) yamuxConfig() *yamux.Config {
|
||||||
cfg := yamux.DefaultConfig()
|
cfg := yamux.DefaultConfig()
|
||||||
cfg.EnableKeepAlive = false
|
cfg.EnableKeepAlive = false
|
||||||
cfg.ConnectionWriteTimeout = time.Second * 5
|
cfg.ConnectionWriteTimeout = time.Second * 15
|
||||||
cfg.MaxMessageSize = 65535
|
cfg.MaxMessageSize = 65535
|
||||||
cfg.ReadBufSize = 655350
|
cfg.ReadBufSize = 655350
|
||||||
return cfg
|
return cfg
|
||||||
|
|
Loading…
Reference in New Issue