mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
enable ack delay
This commit is contained in:
parent
3ec7d81f85
commit
67121de7a2
4
gun.js
4
gun.js
@ -765,11 +765,11 @@
|
||||
if(!this.on){ return }
|
||||
var id = text_rand(9);
|
||||
if(cb){
|
||||
var to = this.on(id, cb, as);
|
||||
var to = this.on(id, cb, as), delay = (this.gun._.opt.ackDelay || 9);
|
||||
to.err = setTimeout(function(){
|
||||
to.next({err: "Error: No ACK received yet."});
|
||||
to.off();
|
||||
}, 1000 * 9); // TODO: Make configurable!!!
|
||||
}, 1000 * (delay < 1 ? 1 : delay));
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user