From 7634722049673d0ab15066d336862b7a4b7bb72f Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Thu, 27 May 2021 08:54:47 +0300 Subject: [PATCH] fix reader pause if count 1 --- server/torr/storage/torrstor/reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/torr/storage/torrstor/reader.go b/server/torr/storage/torrstor/reader.go index 2cbf3dc..3d5e57e 100644 --- a/server/torr/storage/torrstor/reader.go +++ b/server/torr/storage/torrstor/reader.go @@ -135,7 +135,7 @@ func (r *Reader) getPieceNum(offset int64) int { func (r *Reader) getOffsetRange() (int64, int64) { - if time.Now().Unix() > r.lastAccess+60 { + if time.Now().Unix() > r.lastAccess+60 && len(r.cache.readers) > 1 { return r.file.Offset(), r.file.Offset() }