Author: jbellis
Date: Wed Dec 22 18:33:31 2010
New Revision: 1052021

URL: http://svn.apache.org/viewvc?rev=1052021&view=rev
Log:
fix cli crash after backgrounding
patch by Pavel Yaskevich; reviewed by jbellis for CASSANDRA-1875

Modified:
    cassandra/branches/cassandra-0.7/CHANGES.txt
    
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliMain.java

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1052021&r1=1052020&r2=1052021&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Wed Dec 22 18:33:31 2010
@@ -1,3 +1,7 @@
+dev
+ * fix cli crash after backgrounding (CASSANDRA-1875)
+
+
 0.7.0-rc3
  * expose getNaturalEndpoints in StorageServiceMBean taking byte[]
    key; RMI cannot serialize ByteBuffer (CASSANDRA-1833)

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliMain.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliMain.java?rev=1052021&r1=1052020&r2=1052021&view=diff
==============================================================================
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliMain.java 
(original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/cli/CliMain.java 
Wed Dec 22 18:33:31 2010
@@ -325,7 +325,14 @@ public class CliMain
         {
             prompt = (inCompoundStatement) ? "...\t" : getPrompt(cliClient);
 
-            line = reader.readLine(prompt);
+            try
+            {
+                line = reader.readLine(prompt);
+            }
+            catch (IOException e)
+            {
+                // retry on I/O Exception
+            }
 
             if (line == null)
                 return;


Reply via email to