mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
@@ -135,14 +135,13 @@ func (t *Torrent) AddExpiredTime(duration time.Duration) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *Torrent) watch() {
|
func (t *Torrent) watch() {
|
||||||
t.progressTicker = time.NewTicker(time.Second / 2)
|
t.progressTicker = time.NewTicker(time.Second)
|
||||||
defer t.progressTicker.Stop()
|
defer t.progressTicker.Stop()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-t.progressTicker.C:
|
case <-t.progressTicker.C:
|
||||||
go t.progressEvent()
|
go t.progressEvent()
|
||||||
time.Sleep(time.Second / 2) // FIXME! TEMP TEST TIMER
|
|
||||||
case <-t.closed:
|
case <-t.closed:
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user