dht-rpc 6.16.0 → 6.16.1

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.
Files changed (2) hide show
  1. package/lib/io.js +2 -2
  2. package/package.json +1 -1
package/lib/io.js CHANGED
@@ -103,7 +103,7 @@ module.exports = class IO {
103
103
 
104
104
  this.congestion.recv()
105
105
 
106
- if (req.command < this.stats.commands.length) {
106
+ if (req.internal && req.command < this.stats.commands.length) {
107
107
  this.stats.commands[req.command].rx++
108
108
  }
109
109
 
@@ -289,7 +289,7 @@ module.exports = class IO {
289
289
  this.inflight.push(req)
290
290
  if (session) session._attach(req)
291
291
 
292
- if (command < this.stats.commands.length) {
292
+ if (internal && command < this.stats.commands.length) {
293
293
  this.stats.commands[command].tx++
294
294
  }
295
295
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dht-rpc",
3
- "version": "6.16.0",
3
+ "version": "6.16.1",
4
4
  "description": "Make RPC calls over a Kademlia based DHT",
5
5
  "main": "index.js",
6
6
  "files": [