peer: error on finishDrain.
This commit is contained in:
parent
89f86ae6c5
commit
7fd2c409ae
@ -857,7 +857,7 @@ Peer.prototype.maybeStall = function maybeStall() {
|
|||||||
if (util.now() < this.drainStart + 10)
|
if (util.now() < this.drainStart + 10)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this.finishDrain();
|
this.finishDrain(new Error('Peer stalled.'));
|
||||||
this.error('Peer stalled.');
|
this.error('Peer stalled.');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -885,7 +885,7 @@ Peer.prototype.finishDrain = function finishDrain(err) {
|
|||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Peer.prototype.trySend = function send(packet) {
|
Peer.prototype.trySend = function trySend(packet) {
|
||||||
return this.send(packet).catch(util.nop);
|
return this.send(packet).catch(util.nop);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user