Skip to content

Commit

Permalink
cache the length property
Browse files Browse the repository at this point in the history
  • Loading branch information
aheckmann committed Sep 1, 2010
1 parent 691de0e commit 831c293
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/socket.io/listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Listener = module.exports = function(server, options){

this.server.addListener('request', function(req, res){
if (self.check(req, res)) return;
for (var i = 0; i < listeners.length; i++){
for (var i = 0, len = listeners.length; i < len; i++){
listeners[i].call(this, req, res);
}
});
Expand Down

0 comments on commit 831c293

Please sign in to comment.