Commit 797a50eb6e8f09face50d866903cbbe0dcf5c48a
treat 0 as request, not hop count
Dominic Tarr committed on 7/8/2017, 12:54:14 AMParent: 8f69ac48d2f64075bec0751363849fc1a2e816ac
Files changed
inject.js | changed |
inject.js | |||
---|---|---|---|
@@ -125,9 +125,9 @@ | |||
125 | 125 … | function process (data, peer, cb) { | |
126 | 126 … | var n = 0, res = {} | |
127 | 127 … | for(var id in data) { | |
128 | 128 … | if(isBlobId(id) && isInteger(data[id])) { | |
129 | - if(data[id] <= 0 && (opts.stingy !== true || push[id])) { //interpret as "WANT" | ||
129 … | + if(data[id] < 0 && (opts.stingy !== true || push[id])) { //interpret as "WANT" | ||
130 | 130 … | n++ | |
131 | 131 … | //check whether we already *HAVE* this file. | |
132 | 132 … | //respond with it's size, if we do. | |
133 | 133 … | blobs.size(id, function (err, size) { //XXX | |
@@ -336,4 +336,5 @@ | |||
336 | 336 … | } | |
337 | 337 … | } | |
338 | 338 … | ||
339 | 339 … | ||
340 … | + |
Built with git-ssb-web