Skip to content

Commit

Permalink
Update useIPScanner.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Mar 5, 2024
1 parent 8fab648 commit 6e8a48e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/hooks/useIPScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type ValidIP = {
};

const TRY_CHARS = ["", "|", "/", "-", "\\"] as const;
const MAX_TRIES = 4;
const MAX_TRIES = 5;
export type TryChar = (typeof TRY_CHARS)[number];

export type Settings = {
Expand Down Expand Up @@ -213,12 +213,10 @@ export const useIPScanner = ({ allIps }: IPScannerProps) => {
const latency = Math.floor((performance.now() - startTime) / MAX_TRIES);

if (testCount === MAX_TRIES && latency <= state.maxLatency) {
if ( latency > 50 ) {
addValidIP({
ip,
latency,
});
}
addValidIP({
ip,
latency,
});
}

if (
Expand Down

0 comments on commit 6e8a48e

Please sign in to comment.