]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Set testing keep alive timeout to 1 millisecond
authorMatt Joiner <anacrolix@gmail.com>
Wed, 18 Aug 2021 06:23:51 +0000 (16:23 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 19 Aug 2021 03:37:00 +0000 (13:37 +1000)
If it's too fast, we get stuck trying to send keep alives rather than actually communicating with the peer.

testing.go

index ed8251453de2697e156883d0b5b92574414b0855..6a9d892d4dbeaad495c9ac08a8b2d535a028f4eb 100644 (file)
@@ -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()