Fix: wg-easy threshold not properly computed (#3574)
This commit is contained in:
1 parent
19c3ac0d7e
commit
67a69a5878
2 files changed
+10
-3
No files matched your search
@@ -28,7 +28,7 @@ export default function Component({ service }) {
|
||||
|
||||
const enabled = infoData.filter((item) => item.enabled).length;
|
||||
const disabled = infoData.length - enabled;
|
||||
const connectionThreshold = widget.threshold ?? 2 * 60 * 1000;
|
||||
const connectionThreshold = (widget.threshold ?? 2) * 60 * 1000;
|
||||
const currentTime = new Date();
|
||||
const connected = infoData.filter(
|
||||
(item) => currentTime - new Date(item.latestHandshakeAt) < connectionThreshold,
|
||||
|
||||
Reference in new issue
Block a user