projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfa03ad
)
tls: fix sporadic hang and partial reads
author
Fedor Indutny
<fedor.indutny@gmail.com>
Fri, 27 Sep 2013 19:47:13 +0000
(23:47 +0400)
committer
Fedor Indutny
<fedor.indutny@gmail.com>
Fri, 27 Sep 2013 19:47:13 +0000
(23:47 +0400)
Do not decrement size in read loop, its used later, when comparing to
`bytesRead`.
fix #6270
NOTE: Original patch contributed by @roadrunner2
lib/tls.js
patch
|
blob
|
history
diff --git
a/lib/tls.js
b/lib/tls.js
index
a758c8e
..
fe94a51
100644
(file)
--- a/
lib/tls.js
+++ b/
lib/tls.js
@@
-447,10
+447,9
@@
CryptoStream.prototype._read = function read(size) {
var bytesRead = 0,
start = this._buffer.offset;
do {
- var read = this._buffer.use(this.pair.ssl, out, size);
+ var read = this._buffer.use(this.pair.ssl, out, size
- bytesRead
);
if (read > 0) {
bytesRead += read;
- size -= read;
}
// Handle and report errors