4fd4d8d6 by Lorenzo Mangani Committed by GitHub

Update mem.js

1 parent 43607ae2
Showing 1 changed file with 18 additions and 0 deletions
......@@ -29,6 +29,24 @@
to = setTimeout(flush, opt.wait || 1);
});
ctx.on("put", function(at) {
this.to.next(at);
Gun.graph.is(at.put, null, null);
if (!at["@"]) {
acks[at["#"]] = true;
} // only ack non-acks.
count += 1;
if (count >= (opt.batch || 10000)) {
return flush();
}
if (to) {
return;
}
to = setTimeout(flush, opt.wait || 1);
var id = at['#']
ctx.on('in', {"@": id, ok:1})
});
ctx.on("get", function(at) {
// this.to.next(at); //What does this do?
var lex = at.get,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!