Permalink
Browse files

Make dnode server emit 'end' on TLS connection close

TLS connections do not emit 'end'. Therefore, we must emit 'end' on the
TLS connection 'close' event.
  • Loading branch information...
1 parent 072b650 commit ed46d2cb74c406d7ca903cd41135a07251ab6524 @ahhentz committed Sep 23, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 index.js
View
@@ -227,6 +227,7 @@ function createClient (proto, stream) {
client.end = stream.end.bind(stream);
client.destroy = stream.destroy.bind(stream);
+ stream.on('close', client.emit.bind(client, 'end'));
stream.on('end', client.emit.bind(client, 'end'));
client.on('request', function (req) {

0 comments on commit ed46d2c

Please sign in to comment.