refactor expired time

This commit is contained in:
YouROK
2020-12-30 10:19:41 +03:00
parent 34f81ed64f
commit 237d9e9fde
2 changed files with 9 additions and 5 deletions

View File

@@ -54,7 +54,7 @@ func GetTorrent(hashHex string) *Torrent {
hash := metainfo.NewHashFromHex(hashHex)
tor := bts.GetTorrent(hash)
if tor != nil {
tor.expiredTime = time.Now().Add(time.Minute)
tor.AddExpiredTime(time.Minute)
return tor
}