Commit 7848b9ebf65d7da001095458a722f4fbb7fa296e
tweak schedule some more
Ev Bogue committed on 2/1/2017, 3:12:34 PMParent: f773a1347705017696e0c401a04c923bf71ab47f
Files changed
plugins/gossip/schedule.js | changed |
plugins/gossip/schedule.js | ||
---|---|---|
@@ -48,9 +48,10 @@ | ||
48 | 48 … | } |
49 | 49 … | |
50 | 50 … | function isInactive (e) { |
51 | 51 … | //return e.stateChange && e.duration.mean == 0 |
52 | - return e.stateChange && (!e.duration || e.duration.mean == 0) | |
52 … | + //return e.stateChange && (!e.duration || e.duration.mean == 0) | |
53 … | + return e.state !== 'connecting' && e.stateChange && (!e.duration || e.duration.mean == 0) | |
53 | 54 … | } |
54 | 55 … | |
55 | 56 … | function isLongterm (e) { |
56 | 57 … | //return e.ping && e.ping.rtt.mean > 0 |
@@ -126,15 +127,14 @@ | ||
126 | 127 … | |
127 | 128 … | //quota, groupMin, min, factor, max |
128 | 129 … | |
129 | 130 … | connect(peers, ts, 'attempt', exports.isUnattempted, { |
130 | - min: 0, quota: 10, factor: 0, max: 0, groupMin: 0, | |
131 … | + min: 0, quota: 1, factor: 0, max: 0, groupMin: 0, | |
131 | 132 … | disable: !conf('global', true) |
132 | 133 … | }) |
133 | 134 … | |
134 | 135 … | connect(peers, ts, 'retry', exports.isInactive, { |
135 | - min: 0, | |
136 | - quota: 3, factor: 5*60e3, max: 3*60*60e3, groupMin: 5*50e3 | |
136 … | + min: 0, quota: 3, factor: 5*60e3, max: 3*60*60e3, groupMin: 5*50e3 | |
137 | 137 … | }) |
138 | 138 … | |
139 | 139 … | connect(peers, ts, 'legacy', exports.isLegacy, { |
140 | 140 … | quota: 3, factor: 5*min, max: 3*hour, groupMin: 5*min, |
@@ -160,9 +160,9 @@ | ||
160 | 160 … | }) |
161 | 161 … | ) |
162 | 162 … | |
163 | 163 … | var int = setInterval(connections, 2e3) |
164 | - if(int.unref) int.unref() | |
164 … | + //if(int.unref) int.unref() | |
165 | 165 … | |
166 | 166 … | connections() |
167 | 167 … | } |
168 | 168 … |
Built with git-ssb-web