Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 fde05f4f1 -> 51bf51813
  refs/heads/cassandra-3.11 513352673 -> 36375f8b5
  refs/heads/trunk 8587b0ceb -> 1e58a53ca


Close socket on error during connect on OutboundTcpConnection

Patch by Paulo Motta; Reviewed by Robert Stupp for CASSANDRA-9630


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/51bf5181
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/51bf5181
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/51bf5181

Branch: refs/heads/cassandra-3.0
Commit: 51bf51813c4a7a9f9ad3adfe8ddac171b398816b
Parents: fde05f4
Author: Paulo Motta <pauloricard...@gmail.com>
Authored: Thu Jul 28 18:49:42 2016 -0300
Committer: Paulo Motta <pa...@apache.org>
Committed: Sat Jan 13 01:22:22 2018 -0200

----------------------------------------------------------------------
 CHANGES.txt                                                  | 1 +
 src/java/org/apache/cassandra/net/OutboundTcpConnection.java | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/51bf5181/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c32e56a..0453ddd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.16
+ * Close socket on error during connect on OutboundTcpConnection 
(CASSANDRA-9630)
  * Set encoding for javadoc generation (CASSANDRA-14154)
  * Fix index target computation for dense composite tables with dropped 
compact storage (CASSANDRA-14104)
  * Improve commit log chain marker updating (CASSANDRA-14108)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/51bf5181/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnection.java 
b/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
index 99ad194..9fbd3a8 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
@@ -538,13 +538,13 @@ public class OutboundTcpConnection extends Thread
             catch (SSLHandshakeException e)
             {
                 logger.error("SSL handshake error for outbound connection to " 
+ socket, e);
-                socket = null;
+                disconnect();
                 // SSL errors won't be recoverable within timeout period so 
we'll just abort
                 return false;
             }
             catch (IOException e)
             {
-                socket = null;
+                disconnect();
                 if (logger.isTraceEnabled())
                     logger.trace("unable to connect to " + 
poolReference.endPoint(), e);
                 Uninterruptibles.sleepUninterruptibly(OPEN_RETRY_DELAY, 
TimeUnit.MILLISECONDS);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to