HDFS-11533. reuseAddress option should be used for child channels in Portmap and SimpleTcpServer. Contributed by Mukul Kumar Singh.
This commit is contained in:
parent
79ede403ee
commit
09ad8effb8
|
@ -81,6 +81,7 @@ public class SimpleTcpServer {
|
||||||
});
|
});
|
||||||
server.setOption("child.tcpNoDelay", true);
|
server.setOption("child.tcpNoDelay", true);
|
||||||
server.setOption("child.keepAlive", true);
|
server.setOption("child.keepAlive", true);
|
||||||
|
server.setOption("child.reuseAddress", true);
|
||||||
server.setOption("reuseAddress", true);
|
server.setOption("reuseAddress", true);
|
||||||
|
|
||||||
// Listen to TCP port
|
// Listen to TCP port
|
||||||
|
|
|
@ -110,6 +110,7 @@ final class Portmap {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
tcpServer.setOption("reuseAddress", true);
|
tcpServer.setOption("reuseAddress", true);
|
||||||
|
tcpServer.setOption("child.reuseAddress", true);
|
||||||
|
|
||||||
udpServer = new ConnectionlessBootstrap(new NioDatagramChannelFactory(
|
udpServer = new ConnectionlessBootstrap(new NioDatagramChannelFactory(
|
||||||
Executors.newCachedThreadPool()));
|
Executors.newCachedThreadPool()));
|
||||||
|
|
Loading…
Reference in New Issue