Only calculate delta if tracker is private
This commit is contained in:
parent
f747a79c8c
commit
5622a3ded2
1 changed files with 4 additions and 1 deletions
|
@ -54,7 +54,10 @@ func (tkr *Tracker) HandleAnnounce(ann *models.Announce, w Writer) error {
|
|||
|
||||
ann.BuildPeer(user, torrent)
|
||||
|
||||
uploaded, downloaded := delta(ann)
|
||||
var uploaded, downloaded uint64
|
||||
if tkr.cfg.PrivateEnabled {
|
||||
uploaded, downloaded = delta(ann)
|
||||
}
|
||||
|
||||
created, err := updateSwarm(conn, ann)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue