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:
2d02e6a
)
Emit 'end' from crypto streams on close
author
Ryan Dahl
<ry@tinyclouds.org>
Fri, 21 Oct 2011 20:07:48 +0000
(13:07 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Fri, 21 Oct 2011 20:16:41 +0000
(13:16 -0700)
Fixes test/simple/test-tls-peer-certificate.js on Windows
Patch from bnoordhuis.
See also
75a0cf970fb48440a93a62796ab1f128fcbe7d76
lib/tls.js
patch
|
blob
|
history
diff --git
a/lib/tls.js
b/lib/tls.js
index 2dd8f16d076b9fe067b0b5d671bd8a896ffd5e88..e84d501fc0d34ed8bf228e18de27c6e28882e69b 100644
(file)
--- a/
lib/tls.js
+++ b/
lib/tls.js
@@
-679,6
+679,8
@@
SecurePair.prototype.destroy = function() {
self.cleartext.writable = self.cleartext.readable = false;
process.nextTick(function() {
+ self.encrypted.emit('end');
+ self.cleartext.emit('end');
self.encrypted.emit('close');
self.cleartext.emit('close');
});
@@
-1025,7
+1027,7
@@
function pipe(pair, socket) {
function onclose() {
socket.removeListener('error', onerror);
- socket.removeListener('
close
', onclose);
+ socket.removeListener('
end
', onclose);
socket.removeListener('timeout', ontimeout);
}