streams2: Do not allow hwm < lwm
authorisaacs <i@izs.me>
Tue, 15 Jan 2013 00:03:38 +0000 (16:03 -0800)
committerisaacs <i@izs.me>
Tue, 15 Jan 2013 00:03:38 +0000 (16:03 -0800)
commit20a3c5d09c41e2e612885a6ac166144f14179f07
treee05028b1df4de0da8cd0af5eb87a4df00a9882fa
parent27fafd464870545eb2cce3f66064e9ffd49b3673
streams2: Do not allow hwm < lwm

There was previously an assert() in there, but this part of the code is
so high-volume that the added cost made a measurable dent in http_simple.

Just checking inline is fine, though, and prevents a lot of potential
hazards.
lib/_stream_readable.js
lib/_stream_writable.js
test/simple/test-stream2-basic.js