From 7bc806edb45f2a7c3bedcf86e77b2d11c322f56f Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 21 Oct 2018 20:33:18 -0700 Subject: [PATCH] Increase polling rate to once per 2 minutes to ensure rules are updated quickly after a router reboot --- miss/miss.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miss/miss.cpp b/miss/miss.cpp index efe40ab..c51aa6e 100644 --- a/miss/miss.cpp +++ b/miss/miss.cpp @@ -29,6 +29,7 @@ #define SERVICE_NAME "MISS" #define UPNP_SERVICE_NAME "Moonlight" +#define POLLING_DELAY_SEC 120 #define PORT_MAPPING_DURATION_SEC 3600 #define UPNP_DISCOVERY_DELAY_MS 5000 @@ -590,7 +591,7 @@ int Run() fflush(stdout); ULONGLONG beforeSleepTime = GetTickCount64(); - DWORD ret = WaitForMultipleObjects(ARRAYSIZE(events), events, false, (PORT_MAPPING_DURATION_SEC * 1000) / 2); + DWORD ret = WaitForMultipleObjects(ARRAYSIZE(events), events, false, POLLING_DELAY_SEC * 1000); if (ret == WAIT_OBJECT_0) { ResetLogFile();