[or-cvs] r16582: {torctl} Throw a CancellationException when getResponse is interrupte (torctl/trunk/java/net/freehaven/tor/control)

sebastian at seul.org sebastian at seul.org
Mon Aug 18 14:53:46 UTC 2008


Author: sebastian
Date: 2008-08-18 10:53:46 -0400 (Mon, 18 Aug 2008)
New Revision: 16582

Modified:
   torctl/trunk/java/net/freehaven/tor/control/TorControlConnection.java
Log:
Throw a CancellationException when getResponse is interrupted.

Modified: torctl/trunk/java/net/freehaven/tor/control/TorControlConnection.java
===================================================================
--- torctl/trunk/java/net/freehaven/tor/control/TorControlConnection.java	2008-08-18 06:33:54 UTC (rev 16581)
+++ torctl/trunk/java/net/freehaven/tor/control/TorControlConnection.java	2008-08-18 14:53:46 UTC (rev 16582)
@@ -38,7 +38,8 @@
                     wait();
                 }
             } catch (InterruptedException ex) {
-                return null;
+                throw new CancellationException(
+                    "Please don't interrupt library calls.");
             }
             return response;
         }



More information about the tor-commits mailing list