Fixed RSS timer

This commit is contained in:
Kenneth Jao 2024-08-09 10:26:17 -04:00
parent 7b32722607
commit 3306a9f1ab

View File

@ -312,12 +312,14 @@ func NewDaemon(server string, polling int, download string, socket net.Listener,
func (d *Daemon) Serve() {
d.CheckRSS()
rssTick := time.Tick(d.PollingRate * time.Minute)
checkTick := time.Tick(10 * time.Second)
for {
select {
case <-time.After(d.PollingRate * time.Minute):
case <-rssTick:
e.Log("Checking RSS", LogStd())
d.CheckRSS()
case <-time.After(10 * time.Second):
case <-checkTick:
d.CheckTorrents()
case conn := <-d.Listener:
d.ReadSocket(conn)