dht-rpc 6.16.1 → 6.16.2
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/query.js +5 -3
- package/package.json +1 -1
package/lib/query.js
CHANGED
|
@@ -277,12 +277,14 @@ module.exports = class Query extends Readable {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
_onerror (
|
|
280
|
+
_onerror (err, req) {
|
|
281
281
|
const addr = req.to.host + ':' + req.to.port
|
|
282
282
|
const refs = this._seen.get(addr)
|
|
283
283
|
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
if (err.code === 'REQUEST_TIMEOUT') {
|
|
285
|
+
this._seen.set(addr, DOWN)
|
|
286
|
+
for (const node of refs) this._downHint(node, req.to)
|
|
287
|
+
}
|
|
286
288
|
|
|
287
289
|
this._dec(req)
|
|
288
290
|
this.errors++
|