|
|
@ -169,8 +169,8 @@ class IO { |
|
|
|
if (message.command === '_holepunch') this._holepunch(req) |
|
|
|
} |
|
|
|
|
|
|
|
_cancel (rid, err) { |
|
|
|
this._finish(rid, err || ECANCELLED, null, null) |
|
|
|
_cancel (rid, err, peer) { |
|
|
|
this._finish(rid, err || ECANCELLED, null, peer) |
|
|
|
} |
|
|
|
|
|
|
|
_onrotate () { |
|
|
@ -193,7 +193,7 @@ class IO { |
|
|
|
continue |
|
|
|
} |
|
|
|
|
|
|
|
this._cancel(req.rid, ETIMEDOUT) |
|
|
|
this._cancel(req.rid, ETIMEDOUT, req.peer) |
|
|
|
i-- // the cancel removes the entry so we need to dec i
|
|
|
|
} |
|
|
|
|
|
|
@ -213,8 +213,8 @@ class IO { |
|
|
|
const pending = this._pending |
|
|
|
this._pending = [] |
|
|
|
|
|
|
|
for (const req of pending) req.callback(ECANCELLED) |
|
|
|
for (const req of this.inflight) this._cancel(req.rid) |
|
|
|
for (const req of pending) req.callback(ECANCELLED, null, req.peer) |
|
|
|
for (const req of this.inflight) this._cancel(req.rid, null, req.peer) |
|
|
|
} |
|
|
|
|
|
|
|
response (request, value, closerNodes, peer) { |
|
|
|