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

[tor-commits] [vidalia/alpha] Fix possible infinite loop



commit 3b624dbc96abe9e8c2a97880a9a403195ec553dd
Author: Tomás Touceda <chiiph@xxxxxxxxxxxxxx>
Date:   Thu Jun 14 19:34:47 2012 -0300

    Fix possible infinite loop
---
 src/torcontrol/ControlConnection.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/torcontrol/ControlConnection.cpp b/src/torcontrol/ControlConnection.cpp
index cb9f737..5f337c4 100644
--- a/src/torcontrol/ControlConnection.cpp
+++ b/src/torcontrol/ControlConnection.cpp
@@ -325,6 +325,9 @@ ControlConnection::onReadyRead()
       }
     } else {
       tc::error("Unable to read control reply: %1").arg(errmsg);
+      if (!isConnected()) {
+        break;
+      }
     }
   }
 }

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