HADOOP-9898. Set SO_KEEPALIVE on all our sockets. Contributed by Todd Lipcon.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1537638 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Wang 2013-10-31 20:56:42 +00:00
parent 3c0ad2500d
commit 4dfa0bf99f
3 changed files with 4 additions and 0 deletions

View File

@ -164,6 +164,8 @@ Release 2.2.1 - UNRELEASED
HADOOP-10072. TestNfsExports#testMultiMatchers fails due to non-deterministic
timing around cache expiry check. (cnauroth)
HADOOP-9898. Set SO_KEEPALIVE on all our sockets. (todd via wang)
Release 2.2.0 - 2013-10-13
INCOMPATIBLE CHANGES

View File

@ -575,6 +575,7 @@ public class Client {
try {
this.socket = socketFactory.createSocket();
this.socket.setTcpNoDelay(tcpNoDelay);
this.socket.setKeepAlive(true);
/*
* Bind the socket to the host specified in the principal name of the

View File

@ -759,6 +759,7 @@ public abstract class Server {
channel.configureBlocking(false);
channel.socket().setTcpNoDelay(tcpNoDelay);
channel.socket().setKeepAlive(true);
Reader reader = getReader();
try {