Skip to content

Commit

Permalink
fix 'this' reference in routing proxy listener bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Johnson committed Jan 13, 2013
1 parent 26d3646 commit 15afc23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/node-http-proxy/routing-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var RoutingProxy = exports.RoutingProxy = function (options) {
this.on('newListener', function (evt) {
if (evt === 'proxyError' || evt === 'webSocketProxyError') {
Object.keys(self.proxies).forEach(function (key) {
self.proxies[key].on(evt, this.emit.bind(this, evt));
self.proxies[key].on(evt, self.emit.bind(self, evt));
});
}
});
Expand Down

0 comments on commit 15afc23

Please sign in to comment.