From: Matt Joiner Date: Wed, 18 Aug 2021 06:23:51 +0000 (+1000) Subject: Set testing keep alive timeout to 1 millisecond X-Git-Tag: v1.30.3~7 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=8f187411cc6f9c3608c0df67a5b67169b9d2dbb6;p=btrtrc.git Set testing keep alive timeout to 1 millisecond If it's too fast, we get stuck trying to send keep alives rather than actually communicating with the peer. --- diff --git a/testing.go b/testing.go index ed825145..6a9d892d 100644 --- a/testing.go +++ b/testing.go @@ -14,7 +14,7 @@ func TestingConfig(t testing.TB) *ClientConfig { cfg.NoDefaultPortForwarding = true cfg.DisableAcceptRateLimiting = true cfg.ListenPort = 0 - cfg.KeepAliveTimeout = time.Microsecond + cfg.KeepAliveTimeout = time.Millisecond //cfg.Debug = true //cfg.Logger = cfg.Logger.WithText(func(m log.Msg) string { // t := m.Text()