[tor-commits] [vidalia-plugins/master] Check if the tor process is running while waiting for circuit established

chiiph at torproject.org chiiph at torproject.org
Tue Apr 17 22:49:15 UTC 2012


commit c07b50e0b7da5f3b851f080ba24b2b6dc4255c07
Author: Tomás Touceda <chiiph at torproject.org>
Date:   Mon Apr 16 20:29:54 2012 -0300

    Check if the tor process is running while waiting for circuit established
---
 tbb/tbb.js |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/tbb/tbb.js b/tbb/tbb.js
index db8ac42..8955d9d 100644
--- a/tbb/tbb.js
+++ b/tbb/tbb.js
@@ -260,12 +260,18 @@ var tbb = {
         if(!torControl.isConnected())
             return;
 
-        while(!torControl.isCircuitEstablished()) {
+        while(torControl.isRunning() &&
+              torControl.isConnected() &&
+              !torControl.isCircuitEstablished()) {
             vdebug("Waiting on circuit established");
             //sleep(1); // sleep 1s
             QCoreApplication.processEvents();
         }
 
+        if(!torControl.isRunning() ||
+           !torControl.isConnected())
+            return;
+
         var proxyExecutable = this.tab.getSetting(this.ProxyExecutable, "");
         var runAtStart = this.tab.getSetting(this.RunProxyAtStart, "");
         var proxyExecutableArguments = this.tab.getSetting(this.ProxyExecutableArguments, "");





More information about the tor-commits mailing list