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

[tor-commits] [flashproxy/master] Make die really die.



commit 72bd5dbb21d507f433d98d458f3b431bdda2ed6a
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Tue May 20 17:28:45 2014 -0700

    Make die really die.
    
    die was intended to prevent future network operations. In reality, it
    just changed the color of the badge and waited for the next polling
    interval.
    
    https://trac.torproject.org/projects/tor/ticket/11400
---
 proxy/flashproxy.js |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
index e50785c..6307158 100644
--- a/proxy/flashproxy.js
+++ b/proxy/flashproxy.js
@@ -690,19 +690,24 @@ function FlashProxy() {
     };
 
     /* Cease all network operations and prevent any future ones. */
-    this.disable = function() {
-        puts("Disabling.");
+    this.cease_operation = function() {
         this.start = function() { };
         this.proxy_main = function() { };
         this.make_proxy_pair = function(client_addr, relay_addr) { };
         while (this.proxy_pairs.length > 0)
             this.proxy_pairs.pop().close();
+    };
+
+    this.disable = function() {
+        puts("Disabling.");
+        this.cease_operation();
         if (this.badge)
             this.badge.disable();
     };
 
     this.die = function() {
         puts("Dying.");
+        this.cease_operation();
         if (this.badge)
             this.badge.die();
     };



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