disable automatic ping for guest users
parent
63c7d946e9
commit
feab019df1
|
@ -65,6 +65,7 @@ const WakeComponent = ({ machine, addLog, disabled }) => {
|
|||
}, [log, success, error, startingTime, machine.machineId]);
|
||||
|
||||
const pingInLoop = useCallback(async () => {
|
||||
if (disabled) return;
|
||||
await post(
|
||||
routes.pingMachine,
|
||||
{ machineId: machine.machineId },
|
||||
|
@ -82,7 +83,7 @@ const WakeComponent = ({ machine, addLog, disabled }) => {
|
|||
onError: () => {}
|
||||
}
|
||||
);
|
||||
}, [machine, log, pingInterval]);
|
||||
}, [machine, log, pingInterval, disabled]);
|
||||
|
||||
useEffect(pingInLoop, [trigger, pingInLoop]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue