Option name change to lack; use ms as unit

This commit is contained in:
sjones6
2017-08-23 21:14:03 -04:00
parent 67121de7a2
commit f052d133e1

4
gun.js
View File

@@ -765,11 +765,11 @@
if(!this.on){ return }
var id = text_rand(9);
if(cb){
var to = this.on(id, cb, as), delay = (this.gun._.opt.ackDelay || 9);
var to = this.on(id, cb, as), delay = (this.gun._.opt.lack || 9000);
to.err = setTimeout(function(){
to.next({err: "Error: No ACK received yet."});
to.off();
}, 1000 * (delay < 1 ? 1 : delay));
}, lack < 1000 ? 1000 : lack);
}
return id;
}