Only calculate delta if tracker is private

This commit is contained in:
Jimmy Zelinskie 2014-08-01 15:17:28 -04:00
parent f747a79c8c
commit 5622a3ded2

View file

@ -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 {