Skip to content

Commit 15afc23

Browse files
author
Anders Johnson
committed
fix 'this' reference in routing proxy listener bindings
1 parent 26d3646 commit 15afc23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ var RoutingProxy = exports.RoutingProxy = function (options) {
6060
this.on('newListener', function (evt) {
6161
if (evt === 'proxyError' || evt === 'webSocketProxyError') {
6262
Object.keys(self.proxies).forEach(function (key) {
63-
self.proxies[key].on(evt, this.emit.bind(this, evt));
63+
self.proxies[key].on(evt, self.emit.bind(self, evt));
6464
});
6565
}
6666
});

0 commit comments

Comments
 (0)