peer: fix handleDrain.

This commit is contained in:
Christopher Jeffrey 2017-01-23 21:21:05 -08:00
parent 592191c44c
commit caf8043dcb
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1175,10 +1175,11 @@ Peer.prototype.handleDrain = function handleDrain() {
var jobs = this.drainQueue;
var i, job;
this.drainSize = 0;
if (jobs.length === 0)
return;
this.drainSize = 0;
this.drainQueue = [];
for (i = 0; i < jobs.length; i++) {