mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
change script threads to hardwareconcurrency/2 instead of -1, because it can still cause browsers to be sluggish or crash moreso on powerful machines
This commit is contained in:
@ -13,7 +13,7 @@ if (window.Worker) {
|
||||
const challenge = document.querySelector('[data-pow]').dataset.pow;
|
||||
const difficulty = 0;
|
||||
const start = Date.now();
|
||||
const threads = window.navigator.hardwareConcurrency-1;
|
||||
const threads = Math.max(1,Math.floor(window.navigator.hardwareConcurrency/2));
|
||||
let finished = false;
|
||||
const messageHandler = (e) => {
|
||||
if (finished) { return; }
|
||||
|
Reference in New Issue
Block a user