From dfb15da131fc659a6edb2d14ac1c139f85aaf0bf Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 12 Apr 2018 16:10:46 +1000 Subject: [PATCH] Another use of LoopbackListenhost --- fs/torrentfs_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go index 8d56fb75..c8cacc5d 100644 --- a/fs/torrentfs_test.go +++ b/fs/torrentfs_test.go @@ -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()