]> Sergey Matveev's repositories - btrtrc.git/commitdiff
TestSetMaxEstablishedConn does now work with utp
authorMatt Joiner <anacrolix@gmail.com>
Wed, 6 Jul 2016 01:05:04 +0000 (11:05 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 6 Jul 2016 01:05:04 +0000 (11:05 +1000)
I think dialing out from a utp.Socket before its reader has initialized may be the cause. Either way moving the addPeers to after all the Clients are initialized has worked around it as a side effect.

client_test.go

index 28af2af2f7c8c5d306ce4822fed17ad0e01e8b87..d6a83bf24e81e70d7a6dbb07d81b6ac3b6d19953 100644 (file)
@@ -953,7 +953,6 @@ func TestSetMaxEstablishedConn(t *testing.T) {
        var tts []*Torrent
        ih := testutil.GreetingMetaInfo().Info.Hash()
        cfg := TestingConfig
-       cfg.DisableUTP = true
        for i := range iter.N(3) {
                cl, err := NewClient(&cfg)
                require.NoError(t, err)