client_test.go | 1 + config.go | 1 + fs/torrentfs_test.go | 1 + diff --git a/client_test.go b/client_test.go index a1db9db07c242a7e3df113fc1ceb8d06c4b75b6a..e0854867ebbad8a1b18f503867bc3f69f6324424 100644 --- a/client_test.go +++ b/client_test.go @@ -36,6 +36,7 @@ cfg.DataDir = tempDir() cfg.DisableTrackers = true cfg.NoDefaultPortForwarding = true cfg.DisableAcceptRateLimiting = true + cfg.ListenPort = 0 return cfg } diff --git a/config.go b/config.go index 5582456a0a91fec91457afaa9bd91097510266c9..f4c190fb62f1f98d9d767190ce1d1b47fcc80f88 100644 --- a/config.go +++ b/config.go @@ -164,6 +164,7 @@ RequirePreferred: false, }, CryptoSelector: mse.DefaultCryptoSelector, CryptoProvides: mse.AllSupportedCrypto, + ListenPort: 42069, } cc.ConnTracker.SetNoMaxEntries() cc.ConnTracker.Timeout = func(conntrack.Entry) time.Duration { return 0 } diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go index 4a37a351928d51aa0368004e641f073f2c5d8531..582f9c2d5ff2b64ed023387da531545bf9dcf9f2 100644 --- a/fs/torrentfs_test.go +++ b/fs/torrentfs_test.go @@ -189,6 +189,7 @@ cfg.NoDHT = true cfg.DisableTCP = true cfg.DefaultStorage = storage.NewMMap(filepath.Join(layout.BaseDir, "download")) cfg.ListenHost = torrent.LoopbackListenHost + cfg.ListenPort = 0 leecher, err := torrent.NewClient(cfg) require.NoError(t, err) testutil.ExportStatusWriter(leecher, "l")()