Another use of LoopbackListenhost

This commit is contained in:
Matt Joiner 2018-04-12 16:10:46 +10:00
parent 83e4c65fc4
commit dfb15da131
1 changed files with 3 additions and 5 deletions

View 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()