From 5363d8dde8da549c0fb095b2966f77f230f553ff Mon Sep 17 00:00:00 2001 From: Mitchel Disveld Date: Mon, 14 Dec 2020 22:34:17 +0100 Subject: [PATCH] only restart downloads when file is marked as downloading --- surge/SurgeClient.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/surge/SurgeClient.go b/surge/SurgeClient.go index 9b96f69..ee9208b 100644 --- a/surge/SurgeClient.go +++ b/surge/SurgeClient.go @@ -70,7 +70,9 @@ func InitializeClient(args []string, waitForReconnect bool) bool { go BuildSeedString(filesOnDisk) for i := 0; i < len(filesOnDisk); i++ { - go restartDownload(filesOnDisk[i].FileHash) + if filesOnDisk[i].IsDownloading { + go restartDownload(filesOnDisk[i].FileHash) + } } go autoSubscribeWorker()