good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 25a94ceb authored by Alex Sharov's avatar Alex Sharov Committed by GitHub
Browse files

Downloader: print banned ips (#3430)

* save

* save

* save

* save

* save
parent 5a748687
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,6 @@ func TorrentConfig(snapshotsDir string, seeding bool, peerID string, verbosity l
torrentConfig.Logger = NewAdapterLogger().FilterLevel(verbosity)
torrentConfig.DefaultStorage = storage.NewMMap(snapshotsDir)
return torrentConfig, nil
}
......@@ -144,6 +143,14 @@ func MainLoop(ctx context.Context, torrentClient *torrent.Client) {
"peers", stats.peersCount,
"torrents", stats.torrentsCount,
"alloc", common2.ByteCount(m.Alloc), "sys", common2.ByteCount(m.Sys))
if stats.peersCount == 0 {
ips := torrentClient.BadPeerIPs()
if len(ips) > 0 {
log.Info("[torrent] Stats",
"banned", ips)
}
}
}
}
}
......
......@@ -24,10 +24,10 @@ const DefaultPieceSize = 2 * 1024 * 1024
// Trackers - break down by priority tier
var Trackers = [][]string{
trackers.First(5, trackers.Udp),
trackers.First(5, trackers.Https),
//trackers.First(5, trackers.Best),
//trackers.First(5,trackers.Ws),
trackers.First(3, trackers.Udp),
trackers.First(3, trackers.Https),
//trackers.First(3, trackers.Ws),
}
func AllTorrentPaths(dir string) ([]string, error) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment