diff --git a/tracker/storage.go b/tracker/storage.go index 1ec59de..dbcd738 100644 --- a/tracker/storage.go +++ b/tracker/storage.go @@ -191,6 +191,7 @@ func (s *Storage) PurgeInactiveTorrent(infohash string) error { } if torrent.PeerCount() == 0 { + atomic.AddInt32(&s.size, -1) delete(shard.torrents, infohash) }