mirror of
https://github.com/amark/gun.git
synced 2025-07-07 05:12:32 +00:00
fix for @sergibondarenko
This commit is contained in:
parent
0c7316b658
commit
b3bba28994
3
gun.js
3
gun.js
@ -604,10 +604,9 @@
|
|||||||
if(!cb){ return id }
|
if(!cb){ return id }
|
||||||
var to = this.on(id, cb, as);
|
var to = this.on(id, cb, as);
|
||||||
to.err = to.err || setTimeout(function(){
|
to.err = to.err || setTimeout(function(){
|
||||||
//console.log(50, 'TIME OUT', to.err, id);
|
|
||||||
to.next({err: "Error: No ACK received yet."});
|
to.next({err: "Error: No ACK received yet."});
|
||||||
to.off();
|
to.off();
|
||||||
}, 1000 * 9); // TODO: Make configurable!!!
|
}, (this.opt||{}).lack || 9000);
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
})(require, './ask');
|
})(require, './ask');
|
||||||
|
2
gun.min.js
vendored
2
gun.min.js
vendored
File diff suppressed because one or more lines are too long
@ -2,6 +2,6 @@ var Gun = Gun || require('../gun');
|
|||||||
Gun.chain.open || require('gun/lib/open');
|
Gun.chain.open || require('gun/lib/open');
|
||||||
|
|
||||||
Gun.chain.load = function(cb, opt, at){
|
Gun.chain.load = function(cb, opt, at){
|
||||||
(opt = opt || {}).off = !1;
|
(opt = opt || {}).off = !0;
|
||||||
return this.open(cb, opt, at);
|
return this.open(cb, opt, at);
|
||||||
}
|
}
|
@ -28,7 +28,7 @@ Gun.chain.open = function(cb, opt, at){
|
|||||||
}, opt.wait || 1);
|
}, opt.wait || 1);
|
||||||
opt.at = opt.at || ctx;
|
opt.at = opt.at || ctx;
|
||||||
opt.key = opt.key || key;
|
opt.key = opt.key || key;
|
||||||
opt.ev.s[ctx.id] = ev;
|
opt.ev.s[this._.id] = ev;
|
||||||
if(Gun.val.is(data)){
|
if(Gun.val.is(data)){
|
||||||
if(!at){
|
if(!at){
|
||||||
opt.doc = data;
|
opt.doc = data;
|
||||||
|
27
package-lock.json
generated
27
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gun",
|
"name": "gun",
|
||||||
"version": "0.9.0",
|
"version": "0.9.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -84,6 +84,11 @@
|
|||||||
"minimalistic-assert": "1.0.0"
|
"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": {
|
"aws-sdk": {
|
||||||
"version": "2.153.0",
|
"version": "2.153.0",
|
||||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.153.0.tgz",
|
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.153.0.tgz",
|
||||||
@ -1542,8 +1547,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
|
"version": "5.1.1",
|
||||||
"integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c="
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
|
||||||
},
|
},
|
||||||
"sax": {
|
"sax": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
@ -1869,16 +1875,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ws": {
|
"ws": {
|
||||||
"version": "https://registry.npmjs.org/ws/-/ws-2.2.3.tgz",
|
"version": "3.3.2",
|
||||||
"integrity": "sha1-82yXGaVt/4E/RVr5EqIHgUW72UA=",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-3.3.2.tgz",
|
||||||
|
"integrity": "sha512-t+WGpsNxhMR4v6EClXS8r8km5ZljKJzyGhJf7goJz9k5Ye3+b5Bvno5rjqPuIBn5mnn5GBb7o8IrIWHxX1qOLQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
|
"async-limiter": "1.0.0",
|
||||||
"ultron": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz"
|
"safe-buffer": "5.1.1",
|
||||||
|
"ultron": "1.1.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ultron": {
|
"ultron": {
|
||||||
"version": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz",
|
"version": "1.1.1",
|
||||||
"integrity": "sha1-sHoualQagV/Go0zNRTO67DB8qGQ="
|
"resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "gun",
|
"name": "gun",
|
||||||
"version": "0.9.1",
|
"version": "0.9.2",
|
||||||
"description": "Graph engine",
|
"description": "Graph engine",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"browser": "gun.min.js",
|
"browser": "gun.min.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node examples/http.js 8080",
|
"start": "node examples/http.js 8080",
|
||||||
"prepublish": "npm run unbuild",
|
"prepublishOnly": "npm run unbuild",
|
||||||
"test": "mocha",
|
"test": "mocha",
|
||||||
"testsea": "mocha test/sea.js",
|
"testsea": "mocha test/sea.js",
|
||||||
"e2e": "mocha e2e/distributed.js",
|
"e2e": "mocha e2e/distributed.js",
|
||||||
@ -49,7 +49,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"aws-sdk": ">=2.153.0",
|
"aws-sdk": ">=2.153.0",
|
||||||
"ws": "~>2.2.3"
|
"ws": "~>3.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"spark-md5": "^3.0.0",
|
"spark-md5": "^3.0.0",
|
||||||
|
@ -15,10 +15,9 @@ module.exports = function ask(cb, as){
|
|||||||
if(!cb){ return id }
|
if(!cb){ return id }
|
||||||
var to = this.on(id, cb, as);
|
var to = this.on(id, cb, as);
|
||||||
to.err = to.err || setTimeout(function(){
|
to.err = to.err || setTimeout(function(){
|
||||||
//console.log(50, 'TIME OUT', to.err, id);
|
|
||||||
to.next({err: "Error: No ACK received yet."});
|
to.next({err: "Error: No ACK received yet."});
|
||||||
to.off();
|
to.off();
|
||||||
}, 1000 * 9); // TODO: Make configurable!!!
|
}, (this.opt||{}).lack || 9000);
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
@ -8,7 +8,7 @@ function Gun(o){
|
|||||||
|
|
||||||
Gun.is = function(gun){ return (gun instanceof Gun) }
|
Gun.is = function(gun){ return (gun instanceof Gun) }
|
||||||
|
|
||||||
Gun.version = 0.8;
|
Gun.version = 0.9;
|
||||||
|
|
||||||
Gun.chain = Gun.prototype;
|
Gun.chain = Gun.prototype;
|
||||||
Gun.chain.toJSON = function(){};
|
Gun.chain.toJSON = function(){};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user