@ -49,7 +49,7 @@ class QueryStream extends Readable {
_onresponse (err, message, peer, request, to, type) {
this.inflight--
if (err && to.id) {
if (err && to && to.id) {
// Request, including retries, failed completely
// Remove the "to" node.
const node = this._node.bucket.get(to.id)