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.
  • Loading branch information
Marcelo Vanzin committed Apr 23, 2018
1 parent e82cb68 commit 5240d40
Showing 1 changed file with 2 additions and 2 deletions.
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 5240d40

Please sign in to comment.