@dxos/broadcast
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -82,3 +82,3 @@ "use strict"; | ||
this._id = id; | ||
this._lookup = this._buildLookup(middleware.lookup); | ||
this._lookup = this._buildLookup(() => middleware.lookup()); | ||
@@ -169,15 +169,8 @@ this._send = (...args) => middleware.send(...args); | ||
_buildLookup(lookup) { | ||
let looking = null; | ||
return async () => { | ||
try { | ||
if (!looking) { | ||
looking = lookup(); | ||
} | ||
this._peers = await looking; | ||
looking = null; | ||
this._peers = await lookup(); | ||
log('lookup of %h', this._id, this._peers); | ||
} catch (err) { | ||
this.emit('lookup-error', err); | ||
looking = null; | ||
} | ||
@@ -184,0 +177,0 @@ }; |
{ | ||
"name": "@dxos/broadcast", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Abstract module to send broadcast messages.", | ||
@@ -48,2 +48,3 @@ "homepage": "https://github.com/dxos/broadcast#readme", | ||
"@babel/preset-env": "^7.4.5", | ||
"@dxos/network-generator": "^0.0.1", | ||
"babel-eslint": "^10.0.2", | ||
@@ -57,3 +58,2 @@ "babel-jest": "^24.8.0", | ||
"jest": "^24.5.0", | ||
"ngraph.generators": "^18.0.1", | ||
"semistandard": "^14.2.0", | ||
@@ -60,0 +60,0 @@ "wait-for-expect": "^3.0.1" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72489
398