deltas are now private only

This commit is contained in:
Jimmy Zelinskie 2014-06-26 14:26:58 -04:00
parent 9e37c6af02
commit 8775764fb6

View file

@ -65,10 +65,12 @@ func (s Server) serveAnnounce(w http.ResponseWriter, r *http.Request) {
return
}
writeAnnounceResponse(w, announce, user, torrent)
if s.conf.Private {
delta := models.NewAnnounceDelta(announce, peer, user, torrent, created, snatched)
s.backendConn.RecordAnnounce(delta)
}
delta := models.NewAnnounceDelta(announce, peer, user, torrent, created, snatched)
s.backendConn.RecordAnnounce(delta)
writeAnnounceResponse(w, announce, user, torrent)
log.Infof("chihaya: handled announce from %s", announce.IP)
}