fix whel delete from db and getting torrent

This commit is contained in:
YouROK
2020-12-11 15:48:02 +03:00
parent 92ac53257b
commit 27675c89f2

View File

@@ -59,8 +59,9 @@ func GetTorrent(hashHex string) *Torrent {
return tor return tor
} }
tor = GetTorrentDB(hash) tr := GetTorrentDB(hash)
if tr != nil {
tor = tr
go func() { go func() {
tr, _ := NewTorrent(tor.TorrentSpec, bts) tr, _ := NewTorrent(tor.TorrentSpec, bts)
if tr != nil { if tr != nil {
@@ -71,6 +72,7 @@ func GetTorrent(hashHex string) *Torrent {
tr.GotInfo() tr.GotInfo()
} }
}() }()
}
return tor return tor
} }