diff --git a/engine/engine.go b/engine/engine.go index 7f6c7c32..b7ca8339 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -366,12 +366,11 @@ func (e *Engine) StartTorrent(infohash string) error { } if t.t.Info() != nil { t.t.AllowDataUpload() - t.t.AllowDataDownload() - // start all files by setting the priority to normal for _, f := range t.t.Files() { f.SetPriority(torrent.PiecePriorityNormal) } + t.t.AllowDataDownload() } return nil } @@ -392,13 +391,12 @@ func (e *Engine) StopTorrent(infohash string) error { } if t.t.Info() != nil { + t.t.DisallowDataDownload() // stop all files by setting the priority to None for _, f := range t.t.Files() { f.SetPriority(torrent.PiecePriorityNone) } - t.t.DisallowDataUpload() - t.t.DisallowDataDownload() } t.Started = false