diff --git a/lib/http-proxy/index.js b/lib/http-proxy/index.js index f86a7d8..7a5e1d2 100644 --- a/lib/http-proxy/index.js +++ b/lib/http-proxy/index.js @@ -104,7 +104,7 @@ function ProxyServer(options) { return ws[pass]; }); - this.on('error', this.onError.bind(this)); + this.on('error', this.onError, this); }