Skip to content

Commit

Permalink
[minor] Remove setEncoding on incoming socket
Browse files Browse the repository at this point in the history
This isn't needed as we don't do any string operations and `setEncoding`
results in a higher memory usage and is slower.
  • Loading branch information
mmalecki committed Aug 10, 2012
1 parent 1783ab0 commit 812868d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/node-http-proxy/http-proxy.js
Expand Up @@ -452,9 +452,6 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer)
socket.pair.cleartext.socket.setKeepAlive(true, 0);
}
}
else {
socket.setEncoding('utf8');
}
}

//
Expand Down

0 comments on commit 812868d

Please sign in to comment.