git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit 0b9adb1dfcfd2248f55f9dc2130f2d53aeb91794

try to fix local peer discovery replication

Matt McKegg committed on 3/13/2017, 6:37:42 AM
Parent: ff68049609e2f8564d4c3ef26142370345e55d70

Files changed

lib/replicate-with-progress.jschanged
lib/replicate-with-progress.jsView
@@ -143,10 +143,12 @@
143143
144144 function localPeers () {
145145 if (!sbot.gossip) return
146146 sbot.gossip.peers().forEach(function (e) {
147- if (toSend[e.key] == null) {
148- addPeer({id: e.key, sequence: 0})
147+ if (e.source === 'local' && !toSend[e.key]) {
148+ sbot.latestSequence(e.key, function (err, seq) {
149+ addPeer({id: e.key, sequence: err ? 0 : toSeq(seq)})
150+ })
149151 }
150152 })
151153 }
152154

Built with git-ssb-web