dht-rpc 6.25.0 → 6.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/health.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const MAX_HEALTH_WINDOW = 2
2
2
  const RESPONSES_SANITY = 0
3
3
  const TIMEOUTS_SANITY = 0
4
- const TIMEOUTS_THRESHOLD = 0.25
4
+ const TIMEOUTS_THRESHOLD = 0.5
5
5
 
6
6
  module.exports = class NetworkHealth {
7
7
  static DEFAULT_MAX_HEALTH_WINDOW = MAX_HEALTH_WINDOW
package/lib/io.js CHANGED
@@ -595,7 +595,7 @@ function noop() {}
595
595
  function oncycle(req) {
596
596
  req._timeout = null
597
597
  req.oncycle(req)
598
- if (req.sent >= req.retries) {
598
+ if (req.sent > req.retries) {
599
599
  req._io.stats.requests.timeouts++
600
600
  req.destroy(REQUEST_TIMEOUT())
601
601
  req._io.ontimeout(req)
package/lib/query.js CHANGED
@@ -27,7 +27,6 @@ module.exports = class Query extends Readable {
27
27
  this.map = opts.map || defaultMap
28
28
  this.retries =
29
29
  opts.retries === 0 ? 0 : opts.retries || (this.internal && command === DOWN_HINT ? 3 : 5)
30
- this.maxSlow = opts.maxSlow === 0 ? 0 : opts.maxSlow || 5
31
30
  this.closestReplies = []
32
31
 
33
32
  this._slow = 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dht-rpc",
3
- "version": "6.25.0",
3
+ "version": "6.26.0",
4
4
  "description": "Make RPC calls over a Kademlia based DHT",
5
5
  "main": "index.js",
6
6
  "files": [