]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Another use of LoopbackListenhost
authorMatt Joiner <anacrolix@gmail.com>
Thu, 12 Apr 2018 06:10:46 +0000 (16:10 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 12 Apr 2018 06:10:46 +0000 (16:10 +1000)
fs/torrentfs_test.go

index 8d56fb75a6c91136d6fc817279aa91964fc2aead..c8cacc5d37b105d378a6907cb7145cc272e92053 100644 (file)
@@ -185,15 +185,13 @@ func TestDownloadOnDemand(t *testing.T) {
                <-seederTorrent.GotInfo()
                seederTorrent.VerifyData()
        }()
-       leecher, err := torrent.NewClient((&torrent.Config{
+       leecher, err := torrent.NewClient(&torrent.Config{
                DisableTrackers: true,
                NoDHT:           true,
                DisableTCP:      true,
                DefaultStorage:  storage.NewMMap(filepath.Join(layout.BaseDir, "download")),
-               // This can be used to check if clients can connect to other clients
-               // with the same ID.
-               // PeerID: seeder.PeerID(),
-       }).SetListenAddr("localhost:0"))
+               ListenHost:      torrent.LoopbackListenHost,
+       })
        require.NoError(t, err)
        testutil.ExportStatusWriter(leecher, "l")
        defer leecher.Close()