Fix: wg-easy threshold not properly computed (#3574)

This commit is contained in:
Conner Hnatiuk authored and GitHub committed 2024-06-03 14:52:58 -07:00
1 parent 19c3ac0d7e
commit 67a69a5878
2 files changed
+10 -3

No files matched your search

+1 -1
View File
@@ -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,