Repository: cassandra Updated Branches: refs/heads/trunk 39342b993 -> 2629c30a9
Set keepalive on MessagingService connections patch by Jianwei Zhang; reviewed by jbellis for CASSANDRA-7170 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c7e472e8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c7e472e8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c7e472e8 Branch: refs/heads/trunk Commit: c7e472e8c1eb5739866e8c93957738676cc744bc Parents: f4460a5 Author: Jonathan Ellis <jbel...@apache.org> Authored: Tue May 6 22:41:20 2014 -0500 Committer: Jonathan Ellis <jbel...@apache.org> Committed: Tue May 6 22:41:20 2014 -0500 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/net/MessagingService.java | 5 +++++ 2 files changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7e472e8/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 1c6171e..8c1d234 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2.17 + * Set keepalive on MessagingService connections (CASSANDRA-7170) * Add Cloudstack snitch (CASSANDRA-7147) * Update system.peers correctly when relocating tokens (CASSANDRA-7126) * Add Google Compute Engine snitch (CASSANDRA-7132) http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7e472e8/src/java/org/apache/cassandra/net/MessagingService.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/net/MessagingService.java b/src/java/org/apache/cassandra/net/MessagingService.java index 5e4a117..41553b1 100644 --- a/src/java/org/apache/cassandra/net/MessagingService.java +++ b/src/java/org/apache/cassandra/net/MessagingService.java @@ -904,9 +904,14 @@ public final class MessagingService implements MessagingServiceMBean { Socket socket = server.accept(); if (authenticate(socket)) + { + socket.setKeepAlive(true); new IncomingTcpConnection(socket).start(); + } else + { socket.close(); + } } catch (AsynchronousCloseException e) {