tcp-client.js: after read, try read again.

After a read completes it's possible more data is pending so issue an
immediate read again to pick this up quickly.
This commit is contained in:
Joel Martin 2012-09-14 16:35:44 -05:00
parent bd541b3c67
commit 99bf915a97
1 changed files with 3 additions and 0 deletions

View File

@ -249,6 +249,9 @@ Author: Boris Smus (smus@chromium.org)
this.callbacks.recvString(str);
}.bind(this));
}
// Trigger another read right away
setTimeout(this._periodicallyRead.bind(this), 0);
}
};