Commit b9b59cdc293899bbc253a645a7de5c21262f9724
Merge remote-tracking branch 'origin/fix-stuck-download-progress'
Dominic Tarr committed on 10/15/2017, 9:42:53 AMParent: 6902d561e13a8410a9413d484b18ce50b147dd1f
Parent: a3402679b21e016f01d5410acfd19ccf87935815
Files changed
plugins/replicate/legacy.js | changed |
plugins/replicate/legacy.js | ||
---|---|---|
@@ -79,19 +79,17 @@ | ||
79 | 79 … | var pendingPeers = {} |
80 | 80 … | var legacyToRecv = {} |
81 | 81 … | |
82 | 82 … | Object.keys(pendingFeedsForPeer).forEach(function (peerId) { |
83 | - if (pendingFeedsForPeer[peerId]) { | |
83 … | + if (pendingFeedsForPeer[peerId] && pendingFeedsForPeer[peerId].size) { | |
84 | 84 … | Object.keys(toSend).forEach(function (feedId) { |
85 | 85 … | if (peerHas[peerId] && peerHas[peerId][feedId]) { |
86 | 86 … | if (peerHas[peerId][feedId] > toSend[feedId]) { |
87 | 87 … | pendingFeeds.add(feedId) |
88 | 88 … | } |
89 | 89 … | } |
90 | 90 … | }) |
91 | - if (pendingFeedsForPeer[peerId].size) { | |
92 | - pendingPeers[peerId] = pendingFeedsForPeer[peerId].size | |
93 | - } | |
91 … | + pendingPeers[peerId] = pendingFeedsForPeer[peerId].size | |
94 | 92 … | } |
95 | 93 … | }) |
96 | 94 … | |
97 | 95 … | for (var k in toSend) { |
@@ -349,5 +347,4 @@ | ||
349 | 347 … | upto: upto, |
350 | 348 … | changes: notify.listen |
351 | 349 … | } |
352 | 350 … | } |
353 | - |
Built with git-ssb-web