joyent/node — pull request #6282 by indutny (2013-09-27 19:48:36+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