From: Chocobozzz Date: Fri, 4 Dec 2015 18:17:45 +0000 (+0100) Subject: Don't make useless requests to friends X-Git-Tag: v0.0.1-alpha~1075 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=155098af555ef94fb543beb8b82d21523362a7c7;p=oweals%2Fpeertube.git Don't make useless requests to friends --- diff --git a/src/poolRequests.js b/src/poolRequests.js index b117c9923..ee6c0156e 100644 --- a/src/poolRequests.js +++ b/src/poolRequests.js @@ -29,6 +29,8 @@ PoolRequestsDB.find({}, { type: 1, request: 1 }, function (err, pool_requests) { if (err) throw err + if (pool_requests.length === 0) return + var requests = { add: [], remove: []