« Previous | Next » 

Revision 1762dd7e

ID1762dd7ed98417cc7cf124c099f66af11dcf702b
Parent 6bd45015
Child 02374d0c

Added by isaacs over 11 years ago

stream: read(0) should not always trigger _read(n,cb)

This is causing the CryptoStreams to get into an awful state when
there is a tight loop calling connection.write(chunk) waiting for
a false return.

Because CryptoStreams use read(0) to cycle data, this was causing
the encrypted side to pull way too much data in from the cleartext
side, since the read(0) would make it always call _read.

The unfortunate side effect, fixed in the next patch, is that
CryptoStreams don't automatically cycle when the Socket drains.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences