Permalink
Browse files

propogate disconnect and close events

  • Loading branch information...
1 parent 3d4b3d5 commit bdfa358d8c2070a84ac1995118a176a25ad54ba3 @pkrumins pkrumins committed Apr 14, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 index.js
View
@@ -242,6 +242,8 @@ function createClient (proto, stream) {
client.destroy = stream.destroy.bind(stream);
stream.on('end', client.emit.bind(client, 'end'));
+ stream.on('disconnect', client.emit.bind(client, 'disconnect'));
+ stream.on('close', client.emit.bind(client, 'close'));
client.on('request', function (req) {
if (stream.writable) {

0 comments on commit bdfa358

Please sign in to comment.