From 3fbb4376951dc5bf02f66d1a570d21f75c9371ee Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Wed, 24 Feb 2021 21:53:20 +0300 Subject: [PATCH] revert update pause to 1 sec --- server/torr/torrent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/torr/torrent.go b/server/torr/torrent.go index fa9842a..67373b8 100644 --- a/server/torr/torrent.go +++ b/server/torr/torrent.go @@ -132,7 +132,7 @@ func (t *Torrent) AddExpiredTime(duration time.Duration) { } func (t *Torrent) watch() { - t.progressTicker = time.NewTicker(time.Millisecond * 250) + t.progressTicker = time.NewTicker(time.Second) defer t.progressTicker.Stop() for { @@ -323,7 +323,7 @@ func (t *Torrent) Preload(index int, size int64) { if isComplete { break } - time.Sleep(time.Millisecond * 10) + time.Sleep(time.Second) } } log.TLogln("End preload:", file.Torrent().InfoHash().HexString(), "Peers:[", t.Torrent.Stats().ConnectedSeeders, "]", t.Torrent.Stats().ActivePeers, "/", t.Torrent.Stats().TotalPeers)