Skip to content

Commit

Permalink
[SPARK-24029][CORE] Follow up: set SO_REUSEADDR on the server socket.
Browse files Browse the repository at this point in the history
"childOption" is for the remote connections, not for the server socket
that actually listens for incoming connections.

Author: Marcelo Vanzin <[email protected]>

Closes #21132 from vanzin/SPARK-24029.2.
  • Loading branch information
Marcelo Vanzin authored and HyukjinKwon committed Apr 24, 2018
1 parent c8f3ac6 commit 428b903
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ private void init(String hostToBind, int portToBind) {
.group(bossGroup, workerGroup)
.channel(NettyUtils.getServerChannelClass(ioMode))
.option(ChannelOption.ALLOCATOR, allocator)
.childOption(ChannelOption.ALLOCATOR, allocator)
.childOption(ChannelOption.SO_REUSEADDR, !SystemUtils.IS_OS_WINDOWS);
.option(ChannelOption.SO_REUSEADDR, !SystemUtils.IS_OS_WINDOWS)
.childOption(ChannelOption.ALLOCATOR, allocator);

this.metrics = new NettyMemoryMetrics(
allocator, conf.getModuleName() + "-server", conf);
Expand Down

0 comments on commit 428b903

Please sign in to comment.