fix for @sergibondarenko

This commit is contained in:
Mark Nadal 2017-11-29 01:45:45 -08:00
parent 0c7316b658
commit b3bba28994
8 changed files with 27 additions and 20 deletions

3
gun.js
View File

@ -604,10 +604,9 @@
if(!cb){ return id }
var to = this.on(id, cb, as);
to.err = to.err || setTimeout(function(){
//console.log(50, 'TIME OUT', to.err, id);
to.next({err: "Error: No ACK received yet."});
to.off();
}, 1000 * 9); // TODO: Make configurable!!!
}, (this.opt||{}).lack || 9000);
return id;
}
})(require, './ask');

2
gun.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -2,6 +2,6 @@ var Gun = Gun || require('../gun');
Gun.chain.open || require('gun/lib/open');
Gun.chain.load = function(cb, opt, at){
(opt = opt || {}).off = !1;
(opt = opt || {}).off = !0;
return this.open(cb, opt, at);
}

View File

@ -28,7 +28,7 @@ Gun.chain.open = function(cb, opt, at){
}, opt.wait || 1);
opt.at = opt.at || ctx;
opt.key = opt.key || key;
opt.ev.s[ctx.id] = ev;
opt.ev.s[this._.id] = ev;
if(Gun.val.is(data)){
if(!at){
opt.doc = data;

27
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "gun",
"version": "0.9.0",
"version": "0.9.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -84,6 +84,11 @@
"minimalistic-assert": "1.0.0"
}
},
"async-limiter": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
},
"aws-sdk": {
"version": "2.153.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.153.0.tgz",
@ -1542,8 +1547,9 @@
}
},
"safe-buffer": {
"version": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
"integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c="
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
},
"sax": {
"version": "1.2.1",
@ -1869,16 +1875,19 @@
}
},
"ws": {
"version": "https://registry.npmjs.org/ws/-/ws-2.2.3.tgz",
"integrity": "sha1-82yXGaVt/4E/RVr5EqIHgUW72UA=",
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-3.3.2.tgz",
"integrity": "sha512-t+WGpsNxhMR4v6EClXS8r8km5ZljKJzyGhJf7goJz9k5Ye3+b5Bvno5rjqPuIBn5mnn5GBb7o8IrIWHxX1qOLQ==",
"requires": {
"safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
"ultron": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz"
"async-limiter": "1.0.0",
"safe-buffer": "5.1.1",
"ultron": "1.1.1"
},
"dependencies": {
"ultron": {
"version": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz",
"integrity": "sha1-sHoualQagV/Go0zNRTO67DB8qGQ="
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
"integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og=="
}
}
},

View File

@ -1,12 +1,12 @@
{
"name": "gun",
"version": "0.9.1",
"version": "0.9.2",
"description": "Graph engine",
"main": "index.js",
"browser": "gun.min.js",
"scripts": {
"start": "node examples/http.js 8080",
"prepublish": "npm run unbuild",
"prepublishOnly": "npm run unbuild",
"test": "mocha",
"testsea": "mocha test/sea.js",
"e2e": "mocha e2e/distributed.js",
@ -49,7 +49,7 @@
},
"dependencies": {
"aws-sdk": ">=2.153.0",
"ws": "~>2.2.3"
"ws": "~>3.3.2"
},
"devDependencies": {
"spark-md5": "^3.0.0",

View File

@ -15,10 +15,9 @@ module.exports = function ask(cb, as){
if(!cb){ return id }
var to = this.on(id, cb, as);
to.err = to.err || setTimeout(function(){
//console.log(50, 'TIME OUT', to.err, id);
to.next({err: "Error: No ACK received yet."});
to.off();
}, 1000 * 9); // TODO: Make configurable!!!
}, (this.opt||{}).lack || 9000);
return id;
}

View File

@ -8,7 +8,7 @@ function Gun(o){
Gun.is = function(gun){ return (gun instanceof Gun) }
Gun.version = 0.8;
Gun.version = 0.9;
Gun.chain = Gun.prototype;
Gun.chain.toJSON = function(){};