Commit 0b9adb1dfcfd2248f55f9dc2130f2d53aeb91794
try to fix local peer discovery replication
Matt McKegg committed on 3/13/2017, 6:37:42 AMParent: ff68049609e2f8564d4c3ef26142370345e55d70
Files changed
lib/replicate-with-progress.js | changed |
lib/replicate-with-progress.js | ||
---|---|---|
@@ -143,10 +143,12 @@ | ||
143 | 143 | |
144 | 144 | function localPeers () { |
145 | 145 | if (!sbot.gossip) return |
146 | 146 | 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 | + }) | |
149 | 151 | } |
150 | 152 | }) |
151 | 153 | } |
152 | 154 |
Built with git-ssb-web