Browse Source

limit max pong to 32 bytes

session-estimator
Mathias Buus 4 years ago
parent
commit
c58c359519
  1. 2
      index.js

2
index.js

@ -499,7 +499,7 @@ class DHT extends EventEmitter {
// echo the value back
if (req.command === 'ping') {
this._reply(req.tid, null, 0, req.value, req.from, false)
if (req.value === null || req.value.byteLength <= 32) this._reply(req.tid, null, 0, req.value, req.from, false)
return
}

Loading…
Cancel
Save