Skip to content

Commit

Permalink
remove offending code, final fix for issue #364
Browse files Browse the repository at this point in the history
  • Loading branch information
erasmospunk committed Feb 12, 2013
1 parent 43e5f33 commit 3b84e27
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions lib/node-http-proxy/http-proxy.js
Expand Up @@ -312,14 +312,6 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
// Handle 'error' events from the `reverseProxy`.
//
reverseProxy.once('error', proxyError);
//
// NOT needed as node.js re-emits the socket errors as ClientRequest 'error'
// Look for socketErrorListener references in
// https://github.com/joyent/node/blob/master/lib/http.js
//
// reverseProxy.once('socket', function (socket) {
// socket.once('error', proxyError);
// });

//
// Handle 'error' events from the `req` (e.g. `Parse Error`).
Expand Down Expand Up @@ -724,14 +716,6 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer)
return proxyError(ex);
}

//
// NOT needed as node.js re-emits the socket errors as ClientRequest 'error'
// Look for socketErrorListener references in
// https://github.com/joyent/node/blob/master/lib/http.js
//
// Catch socket errors
//socket.on('error', proxyError);

//
// Remove data listener now that the 'handshake' is complete
//
Expand All @@ -743,14 +727,6 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer)
// Handle 'error' events from the `reverseProxy`.
//
reverseProxy.on('error', proxyError);
//
// NOT needed as node.js re-emits the socket errors as ClientRequest 'error'
// Look for socketErrorListener references in
// https://github.com/joyent/node/blob/master/lib/http.js
//
// reverseProxy.once('socket', function (socket) {
// socket.once('error', proxyError);
// });

//
// Handle 'error' events from the `req` (e.g. `Parse Error`).
Expand Down

0 comments on commit 3b84e27

Please sign in to comment.