[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 53d44969a50590b4e35ec28d3c69cfaebe5e76ca
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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.");



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits