Skip to content

Commit 3b84e27

Browse files
committed
remove offending code, final fix for issue #364
1 parent 43e5f33 commit 3b84e27

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

lib/node-http-proxy/http-proxy.js

-24
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,6 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
312312
// Handle 'error' events from the `reverseProxy`.
313313
//
314314
reverseProxy.once('error', proxyError);
315-
//
316-
// NOT needed as node.js re-emits the socket errors as ClientRequest 'error'
317-
// Look for socketErrorListener references in
318-
// https://github.com/joyent/node/blob/master/lib/http.js
319-
//
320-
// reverseProxy.once('socket', function (socket) {
321-
// socket.once('error', proxyError);
322-
// });
323315

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

727-
//
728-
// NOT needed as node.js re-emits the socket errors as ClientRequest 'error'
729-
// Look for socketErrorListener references in
730-
// https://github.com/joyent/node/blob/master/lib/http.js
731-
//
732-
// Catch socket errors
733-
//socket.on('error', proxyError);
734-
735719
//
736720
// Remove data listener now that the 'handshake' is complete
737721
//
@@ -743,14 +727,6 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer)
743727
// Handle 'error' events from the `reverseProxy`.
744728
//
745729
reverseProxy.on('error', proxyError);
746-
//
747-
// NOT needed as node.js re-emits the socket errors as ClientRequest 'error'
748-
// Look for socketErrorListener references in
749-
// https://github.com/joyent/node/blob/master/lib/http.js
750-
//
751-
// reverseProxy.once('socket', function (socket) {
752-
// socket.once('error', proxyError);
753-
// });
754730

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

0 commit comments

Comments
 (0)