Update Torrent.wantPeersEvent in several places
This commit is contained in:
parent
5051d1dcd0
commit
c6ec935e53
|
@ -1508,6 +1508,7 @@ func (cl *Client) AddTorrentInfoHash(infoHash metainfo.Hash) (t *Torrent, new bo
|
|||
go cl.announceTorrentDHT(t, true)
|
||||
}
|
||||
cl.torrents[infoHash] = t
|
||||
t.updateWantPeersEvent()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -519,6 +519,7 @@ func (t *Torrent) close() (err error) {
|
|||
conn.Close()
|
||||
}
|
||||
t.pieceStateChanges.Close()
|
||||
t.updateWantPeersEvent()
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1076,6 +1077,7 @@ func (t *Torrent) addTrackers(announceList [][]string) {
|
|||
(*fullAnnounceList)[tierIndex] = appendMissingStrings((*fullAnnounceList)[tierIndex], trackerURLs)
|
||||
}
|
||||
t.startMissingTrackerScrapers()
|
||||
t.updateWantPeersEvent()
|
||||
}
|
||||
|
||||
// Don't call this before the info is available.
|
||||
|
|
Loading…
Reference in New Issue