From 49fd17c3d43c30a94177d080f7326373159b54b9 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Wed, 17 Jan 2024 07:09:51 +0100 Subject: [PATCH] Add allowance for reinserts --- internal/torrent/repair.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/torrent/repair.go b/internal/torrent/repair.go index 17704d3..51c60c6 100644 --- a/internal/torrent/repair.go +++ b/internal/torrent/repair.go @@ -346,7 +346,7 @@ func (t *TorrentManager) canCapacityHandle() bool { continue } - if count.DownloadingCount < count.MaxNumberOfTorrents { + if count.DownloadingCount < count.MaxNumberOfTorrents-1 { return true } @@ -408,8 +408,8 @@ func (t *TorrentManager) handleRepairTorrents(info *Torrent) bool { t.Api.DeleteTorrent(torrentID) t.onlyForRepair.Remove(torrentID) } - return true } + return true } return false }