Commit 1802ce94b0eb0903cc5f9dd7e00aed245b4f124b
try all the gossip methods!
Dominic Tarr committed on 6/21/2017, 12:20:00 PMParent: 7e73c39d7476e6cfaadac7bd54c77c687056ef3b
Files changed
plugins/gossip/schedule.js | changed |
plugins/gossip/schedule.js | ||
---|---|---|
@@ -104,9 +104,8 @@ | ||
104 | 104 | } |
105 | 105 | |
106 | 106 | var schedule = exports = module.exports = |
107 | 107 | function (gossip, config, server) { |
108 | -// return | |
109 | 108 | var min = 60e3, hour = 60*60e3, closed = false |
110 | 109 | |
111 | 110 | //trigger hard reconnect after suspend or local network changes |
112 | 111 | onWakeup(gossip.reconnect) |
@@ -114,9 +113,9 @@ | ||
114 | 113 | |
115 | 114 | function conf(name, def) { |
116 | 115 | if(config.gossip == null) return def |
117 | 116 | var value = config.gossip[name] |
118 | - return (value === undefined || value === '') ? def : value | |
117 | + return (value == null || value === '') ? def : value | |
119 | 118 | } |
120 | 119 | |
121 | 120 | function connect (peers, ts, name, filter, opts) { |
122 | 121 | opts.group = name |
@@ -159,9 +158,9 @@ | ||
159 | 158 | if(conf('seed', true)) |
160 | 159 | connect(peers, ts, 'seeds', isSeed, { |
161 | 160 | quota: 3, factor: 2e3, max: 10*min, groupMin: 1e3, |
162 | 161 | }) |
163 | - return //XXX | |
162 | + | |
164 | 163 | if(conf('local', true)) |
165 | 164 | connect(peers, ts, 'local', isLocal, { |
166 | 165 | quota: 3, factor: 2e3, max: 10*min, groupMin: 1e3, |
167 | 166 | }) |
@@ -235,9 +234,8 @@ | ||
235 | 234 | connections() |
236 | 235 | |
237 | 236 | return function onClose () { |
238 | 237 | closed = true |
239 | - | |
240 | 238 | } |
241 | 239 | |
242 | 240 | } |
243 | 241 | |
@@ -248,4 +246,8 @@ | ||
248 | 246 | exports.isLocal = isLocal |
249 | 247 | exports.isFriend = isFriend |
250 | 248 | exports.isConnectedOrConnecting = isConnect |
251 | 249 | exports.select = select |
250 | + | |
251 | + | |
252 | + | |
253 | + |
Built with git-ssb-web