Skip to content

Commit

Permalink
Release limiter by -1 after scrape
Browse files Browse the repository at this point in the history
  • Loading branch information
vmandic committed Jan 26, 2024
1 parent 470d2ef commit 3409233
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/http_server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ wss.on("connection", (ws) => {

// Signal the end of scraping
ws.close();

if (scrapingConcurrentCount > 0) {
scrapingConcurrentCount--;
}
} catch (error) {
ws.send(`Error: ${error.message}`);
}
Expand Down

0 comments on commit 3409233

Please sign in to comment.