Skip to content

Commit

Permalink
[fix] make @mmalecki a happy camper
Browse files Browse the repository at this point in the history
  • Loading branch information
yawnt committed Sep 13, 2013
1 parent 1993faf commit c9cd6d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/caronte.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ proxy.createProxyServer = function createProxyServer(options) {
options.ee = new events.EventEmitter2({ wildcard: true, delimiter: ':' });

return {
ee : options.ee,
web : caronte.createWebProxy(options),
ws : caronte.createWsProxy(options),
listen : function listen(port) {
Expand All @@ -63,9 +64,6 @@ proxy.createProxyServer = function createProxyServer(options) {
server.listen(port);

return server;
},
emitter : function() {
return options.ee;
}
};
};
Expand Down
5 changes: 4 additions & 1 deletion lib/caronte/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ function createRightProxy(type) {
return passes[pass];
});

return function(req, res) {
return function(req, res, opts) {
var self = this,
ev = 'caronte:' + type + ':';

if(typeof opts !== 'undefined') { options = opts; }

options.ee.emit(ev + 'begin', req, res);


Expand Down

0 comments on commit c9cd6d2

Please sign in to comment.