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 a545ee4d7f
commit ff08f54f41
1 changed files with 1 additions and 0 deletions

View File

@ -63,6 +63,7 @@ public void run() {
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));