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

[vidalia-svn] r2054: Back out r2014 and add a comment why that little hack is in (in trunk: . src/control)



Author: edmanm
Date: 2007-10-20 22:43:18 -0400 (Sat, 20 Oct 2007)
New Revision: 2054

Modified:
   trunk/
   trunk/src/control/torcontrol.cpp
Log:
 r2169@lysithea:  edmanm | 2007-10-20 22:43:04 -0400
 Back out r2014 and add a comment why that little hack is in there.



Property changes on: trunk
___________________________________________________________________
 svk:merge ticket from /local/vidalia/trunk [r2169] on dc66be73-d13e-47ba-a267-8dc7cda68c65

Modified: trunk/src/control/torcontrol.cpp
===================================================================
--- trunk/src/control/torcontrol.cpp	2007-10-21 01:02:34 UTC (rev 2053)
+++ trunk/src/control/torcontrol.cpp	2007-10-21 02:43:18 UTC (rev 2054)
@@ -393,6 +393,12 @@
 {
   ControlCommand cmd("SIGNAL");
   cmd.addArgument(TorSignal::toString(sig));
+
+  if (sig == TorSignal::Shutdown || sig == TorSignal::Halt) {
+    /* Tor closes the connection before giving us a response to any commands
+     * asking it to stop running, so don't try to get a response. */
+    return _controlConn->send(cmd, errmsg);
+  }
   return send(cmd, errmsg); 
 }