joyent/node — pull request #6283 by indutny (2013-09-27 19:49:25+00:00)
Title: tls: fix sporadic hang and partial reads

Do not decrement size in read loop, its used later, when comparing to
`bytesRead`.

fix #6270

NOTE: Original patch contributed by @roadrunner2

/cc @bnoordhuis