config.go | 2 ++ torrent.go | 2 +- diff --git a/config.go b/config.go index 008a0ad0508a06680b9f104811bad2fbc9e39b4f..c0abb23ed908ff1607d44e6136826ec2945e9acd 100644 --- a/config.go +++ b/config.go @@ -27,6 +27,8 @@ DHTConfig dht.ServerConfig // Never send chunks to peers. NoUpload bool `long:"no-upload"` + // Disable uploading even when it isn't fair. + DisableAggressiveUpload bool `long:"disable-aggressive-upload"` // Upload even after there's nothing in it for us. By default uploading is // not altruistic, we'll upload slightly more than we download from each // peer. diff --git a/torrent.go b/torrent.go index 3591467f0b9a9456a96d2e24f9cc2f5f1df45a96..0e4d00214b1446c56440fbeadf1021110b9efd45 100644 --- a/torrent.go +++ b/torrent.go @@ -1176,7 +1176,7 @@ } if !cl.config.Seed { return false } - if t.needData() { + if cl.config.DisableAggressiveUpload && t.needData() { return false } return true