node-http-proxy/lib/node-http-proxy/http-proxy.js
function proxyError (err) {
    reverseProxy.destroy();

    process.nextTick(function () {
      //
      // Destroy the incoming socket in the next tick, in case the error handler
      // wants to write to it.
      //
      socket.destroy();
    });

    self.emit('webSocketProxyError', req, socket, head);
  }
function proxyError (err) {
    reverseProxy.destroy();

    process.nextTick(function () {
      //
      // Destroy the incoming socket in the next tick, in case the error handler
      // wants to write to it.
      //
      socket.destroy();
    });

    self.emit('webSocketProxyError', req, socket, head);
  }
function proxyError ( err ) { reverseProxy . destroy ( ) ; process . nextTick ( function ( ) { // // Destroy the incoming socket in the next tick, in case the error handler // wants to write to it. // socket . destroy ( ) ; } ) ; self . emit ( 'webSocketProxyError' , req , socket , head ) ; }
On any errors from the `reverseProxy` emit the `webSocketProxyError` and close the appropriate connections.
On any errors from the reverseProxy emit the webSocketProxyError and close the appropriate connections .