good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 4540cdd0 authored by Alex Sharov's avatar Alex Sharov Committed by GitHub
Browse files

don't drop on ctx cancel (#3440)

parent 5f4c284e
No related branches found
No related tags found
No related merge requests found
......@@ -267,12 +267,11 @@ func ResolveAbsentTorrents(ctx context.Context, torrentClient *torrent.Client, p
for _, t := range torrentClient.Torrents() {
select {
case <-ctx.Done():
t.Drop()
return ctx.Err()
case <-t.GotInfo():
mi := t.Metainfo()
_ = CreateTorrentFileIfNotExists(snapshotDir, t.Info(), &mi)
if err := CreateTorrentFileIfNotExists(snapshotDir, t.Info(), &mi); err != nil {
return err
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment