cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1209681 - /cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInSession.java
Date Fri, 02 Dec 2011 20:16:03 GMT
Author: brandonwilliams
Date: Fri Dec  2 20:16:03 2011
New Revision: 1209681

URL: http://svn.apache.org/viewvc?rev=1209681&view=rev
Log:
Check for null socket to make RemoteTest more silent

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInSession.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInSession.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInSession.java?rev=1209681&r1=1209680&r2=1209681&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInSession.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInSession.java Fri Dec 
2 20:16:03 2011
@@ -178,11 +178,15 @@ public class StreamInSession
             logger.info("Finished streaming session {} from {}", getSessionId(), getHost());
             try
             {
-                OutboundTcpConnection.write(reply.getMessage(Gossiper.instance.getVersion(getHost())),
context.right.toString(), new DataOutputStream(socket.getOutputStream()));
+                if (socket != null)
+                    OutboundTcpConnection.write(reply.getMessage(Gossiper.instance.getVersion(getHost())),
context.right.toString(), new DataOutputStream(socket.getOutputStream()));
+                else
+                    logger.debug("No socket to reply to {} with!", getHost());
             }
             finally
             {
-                socket.close();
+                if (socket != null)
+                    socket.close();
             }
 
             if (callback != null)



Mime
View raw message