Skip to content

Commit

Permalink
bind() client.connection properly so conn.end() works again
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jul 27, 2011
1 parent 2106d40 commit f66cc7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/stream_socketio.js
Expand Up @@ -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'));
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name" : "dnode",
"version" : "0.7.3",
"version" : "0.7.4",
"description" : "freestyle RPC",
"main" : "./index.js",
"keywords" : [
Expand Down

0 comments on commit f66cc7f

Please sign in to comment.