fix crash if torrent not get info

This commit is contained in:
YouROK
2021-03-11 19:57:52 +03:00
parent 63df3b4351
commit cb9655e67f

View File

@@ -147,7 +147,9 @@ func (t *Torrent) watch() {
func (t *Torrent) progressEvent() { func (t *Torrent) progressEvent() {
if t.expired() { if t.expired() {
log.TLogln("Torrent close by timeout", t.Torrent.InfoHash().HexString()) if t.TorrentSpec != nil {
log.TLogln("Torrent close by timeout", t.TorrentSpec.InfoHash.HexString())
}
t.bt.RemoveTorrent(t.Hash()) t.bt.RemoveTorrent(t.Hash())
return return
} }