HDFS-11479. Socket re-use address option should be used in SimpleUdpServer. Contributed by Mukul Kumar Singh.

This commit is contained in:
Arpit Agarwal 2017-03-01 12:59:02 -08:00
parent 82ef9accaf
commit 899d5c4d49
1 changed files with 1 additions and 0 deletions

View File

@ -63,6 +63,7 @@ public class SimpleUdpServer {
server.setOption("broadcast", "false");
server.setOption("sendBufferSize", SEND_BUFFER_SIZE);
server.setOption("receiveBufferSize", RECEIVE_BUFFER_SIZE);
server.setOption("reuseAddress", true);
// Listen to the UDP port
ch = server.bind(new InetSocketAddress(port));