git ssb

4+

Dominic / scuttlebot



Commit a3402679b21e016f01d5410acfd19ccf87935815

replicate progress: don't include disconnected peers in incomplete count

fixes stuck downloading message progress in patchwork
Matt McKegg committed on 10/14/2017, 10:28:48 PM
Parent: 65fd88bcd0ed820d86e39b66e316bf759319a4e4

Files changed

plugins/replicate/legacy.jschanged
plugins/replicate/legacy.jsView
@@ -79,19 +79,17 @@
7979 var pendingPeers = {}
8080 var legacyToRecv = {}
8181
8282 Object.keys(pendingFeedsForPeer).forEach(function (peerId) {
83- if (pendingFeedsForPeer[peerId]) {
83 + if (pendingFeedsForPeer[peerId] && pendingFeedsForPeer[peerId].size) {
8484 Object.keys(toSend).forEach(function (feedId) {
8585 if (peerHas[peerId] && peerHas[peerId][feedId]) {
8686 if (peerHas[peerId][feedId] > toSend[feedId]) {
8787 pendingFeeds.add(feedId)
8888 }
8989 }
9090 })
91- if (pendingFeedsForPeer[peerId].size) {
92- pendingPeers[peerId] = pendingFeedsForPeer[peerId].size
93- }
91 + pendingPeers[peerId] = pendingFeedsForPeer[peerId].size
9492 }
9593 })
9694
9795 for (var k in toSend) {
@@ -349,5 +347,4 @@
349347 upto: upto,
350348 changes: notify.listen
351349 }
352350 }
353-

Built with git-ssb-web