Skip to content

Commit

Permalink
Fix concurrency count on full speed ahead.
Browse files Browse the repository at this point in the history
  • Loading branch information
mape committed Jan 2, 2011
1 parent cadaaa4 commit bbf0111
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/scraper.js
Expand Up @@ -64,7 +64,7 @@ module.exports = function scrape(requestOptions, callback, fetchOptions) {
})
});

var concurrentConnections = Math.floor(fetchOptions['reqPerSec']) || 1;
var concurrentConnections = !fetchOptions['reqPerSec'] ? queue.length : (Math.floor(fetchOptions['reqPerSec']) || 1);
var timeSpacing = !fetchOptions['reqPerSec'] ? 0 : 1000/fetchOptions['reqPerSec'];

for (var i=0; i < concurrentConnections; i++) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name" : "scraper",
"description" : "Easier web scraping using jQuery.",
"version" : "0.0.5",
"version" : "0.0.6",
"author" : "Mathias Pettersson <mape@mape.me>",
"engines" : ["node"],
"directories" : { "lib" : "./lib" },
Expand Down

0 comments on commit bbf0111

Please sign in to comment.