Skip to content

Commit

Permalink
Destroy tracker client
Browse files Browse the repository at this point in the history
  • Loading branch information
phillmac committed Jun 23, 2021
1 parent 907dc84 commit 88c1abc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scrape-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ module.exports = function (redisClient, lock, debugVerbose = false) {
trackersPending -= 1
if (trackersPending <= 0) {
logErrors(infoHash, errors)
trackerClient.destroy()
resolve(results)
}
}
Expand All @@ -99,6 +100,7 @@ module.exports = function (redisClient, lock, debugVerbose = false) {
})

trackerClient.on('error', (err) => {
trackerClient.destroy()
reject(err)
})

Expand Down

0 comments on commit 88c1abc

Please sign in to comment.