Skip to content

Commit

Permalink
worker.js: smol fix by adding \n
Browse files Browse the repository at this point in the history
  • Loading branch information
sys-256 committed Jan 26, 2022
1 parent 3bfe622 commit 5dfa632
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ onmessage = (event) => { // Execute on message from the main script
console.log(`CPU${workerVer}: Requesting a job...\n`);
// Asks for a job
socket.send(`JOB,${username},LOW`);
} else if (event.data === `GOOD`) { // If our share is correct
} else if (event.data === `GOOD\n`) { // If our share is correct
// Show in the console that the share was correct
console.log(`CPU${workerVer}: and the share was correct!\n`);
// Show in the console that we're requesting a new job
console.log(`CPU${workerVer}: Requesting a new job...\n`);
// Ask for a new job
socket.send(`JOB,${username},LOW`);
} else if (event.data === `BAD`) { // If our share is incorrect
} else if (event.data === `BAD\n`) { // If our share is incorrect
// Show in the console that the share was wrong
console.log(`CPU${workerVer}: and the share was wrong...\n`);
// Show in the console that we're requesting a new job
Expand Down

0 comments on commit 5dfa632

Please sign in to comment.