lint compliance or something

This commit is contained in:
ansuz
2018-01-29 14:26:24 +01:00
parent f134f11b73
commit 8e2c9ebfa3
3 changed files with 12 additions and 9 deletions

18
rpc.js
View File

@@ -369,15 +369,19 @@ var getDeletedPads = function (Env, channels, cb) {
var sem = Saferphore.create(10);
var absentees = [];
var job = function (channel, wait) {
return function (give) {
getFileSize(Env, channel, wait(give(function (e, size) {
if (e) { return; }
if (size === 0) { absentees.push(channel); }
})));
};
};
nThen(function (w) {
for (var i = 0; i < L; i++) {
let channel = channels[i];
sem.take(function (give) {
getFileSize(Env, channel, w(give(function (e, size) {
if (e) { return; }
if (size === 0) { absentees.push(channel); }
})));
});
sem.take(job(channels[i], w));
}
}).nThen(function () {
cb(void 0, absentees);