Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit ed46d2cb74c406d7ca903cd41135a07251ab6524 1 parent 072b650
Augusto Henrique Hentz authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  index.js
View
1  index.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.