Permalink
Browse files

bind() client.connection properly so conn.end() works again

  • Loading branch information...
1 parent 2106d40 commit f66cc7f34d1e08ffd9c3dd0c82427f9479a6ef04 @substack substack committed Jul 27, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/stream_socketio.js
  2. +1 −1 package.json
@@ -45,8 +45,8 @@ module.exports = function (webserver, mount, ioOptions) {
stream.writable = true;
stream.write = client.send.bind(client);
- stream.end = client.connection.end.bind(client);
- stream.destroy = client.connection.destroy.bind(client);
+ stream.end = client.connection.end.bind(client.connection);
+ stream.destroy = client.connection.destroy.bind(client.connection);
client.on('message', stream.emit.bind(stream, 'data'));
client.on('error', stream.emit.bind(stream, 'error'));
View
@@ -1,6 +1,6 @@
{
"name" : "dnode",
- "version" : "0.7.3",
+ "version" : "0.7.4",
"description" : "freestyle RPC",
"main" : "./index.js",
"keywords" : [

0 comments on commit f66cc7f

Please sign in to comment.