Another use of LoopbackListenhost
This commit is contained in:
parent
83e4c65fc4
commit
dfb15da131
|
@ -185,15 +185,13 @@ func TestDownloadOnDemand(t *testing.T) {
|
||||||
<-seederTorrent.GotInfo()
|
<-seederTorrent.GotInfo()
|
||||||
seederTorrent.VerifyData()
|
seederTorrent.VerifyData()
|
||||||
}()
|
}()
|
||||||
leecher, err := torrent.NewClient((&torrent.Config{
|
leecher, err := torrent.NewClient(&torrent.Config{
|
||||||
DisableTrackers: true,
|
DisableTrackers: true,
|
||||||
NoDHT: true,
|
NoDHT: true,
|
||||||
DisableTCP: true,
|
DisableTCP: true,
|
||||||
DefaultStorage: storage.NewMMap(filepath.Join(layout.BaseDir, "download")),
|
DefaultStorage: storage.NewMMap(filepath.Join(layout.BaseDir, "download")),
|
||||||
// This can be used to check if clients can connect to other clients
|
ListenHost: torrent.LoopbackListenHost,
|
||||||
// with the same ID.
|
})
|
||||||
// PeerID: seeder.PeerID(),
|
|
||||||
}).SetListenAddr("localhost:0"))
|
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
testutil.ExportStatusWriter(leecher, "l")
|
testutil.ExportStatusWriter(leecher, "l")
|
||||||
defer leecher.Close()
|
defer leecher.Close()
|
||||||
|
|
Loading…
Reference in New Issue