chiark / gitweb /
New refresh_min option to bound below the web interface refresh
[disorder] / cgi / actions.c
index 30ddba1ae03bea23b0e24e3eb1dbe5ff36318358..fae533a7b3f45ee37c4ab6e2ed5838ef71c4a0e4 100644 (file)
@@ -95,6 +95,10 @@ static void act_playing(void) {
     if(refresh > config->gap)
       refresh = config->gap;
   }
+  /* Bound the refresh interval below as a back-stop against the above
+   * calculations coming up with a stupid answer */
+  if(refresh < config->refresh_min)
+    refresh = config->refresh_min;
   if((action = cgi_get("action")))
     url = cgi_makeurl(config->url, "action", action, (char *)0);
   else