[tor-commits] [flashproxy/master] Rewrite MIN_FACILITATOR_POLL_INTERVAL test and move out of else.

dcf at torproject.org dcf at torproject.org
Sat Mar 2 09:22:14 UTC 2013


commit 53d44969a50590b4e35ec28d3c69cfaebe5e76ca
Author: David Fifield <david at bamsoftware.com>
Date:   Sat Mar 2 00:58:33 2013 -0800

    Rewrite MIN_FACILITATOR_POLL_INTERVAL test and move out of else.
---
 proxy/flashproxy.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
index 67f0f43..c662f73 100644
--- a/proxy/flashproxy.js
+++ b/proxy/flashproxy.js
@@ -559,9 +559,9 @@ function FlashProxy() {
             if (poll_interval === null) {
                 puts("Error: can't parse polling interval from facilitator, " + repr(poll_interval) + ".");
                 poll_interval = DEFAULT_FACILITATOR_POLL_INTERVAL;
-            } else {
-                poll_interval = Math.max(poll_interval, MIN_FACILITATOR_POLL_INTERVAL);
             }
+            if (poll_interval < MIN_FACILITATOR_POLL_INTERVAL)
+                poll_interval = MIN_FACILITATOR_POLL_INTERVAL;
         }
 
         puts("Next check in " + repr(poll_interval) + " seconds.");





More information about the tor-commits mailing list