Skip to content

Commit

Permalink
Issue #6661 - Make ServerConnector socket options setting optional
Browse files Browse the repository at this point in the history
  • Loading branch information
joakime committed Aug 24, 2021
1 parent ec84207 commit 54edcef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Expand Up @@ -486,7 +486,7 @@ private <T> void setSocketOption(SocketChannel channel, SocketOption<T> option,
catch (Throwable x)
{
if (LOG.isDebugEnabled())
LOG.debug("Could not configure {} to {} on {}", option, value, channel);
LOG.debug("Could not configure {} to {} on {}", option, value, channel, x);
}
}

Expand Down
Expand Up @@ -349,15 +349,16 @@ protected ServerSocketChannel openAcceptChannel() throws IOException
return serverChannel;
}

private <T> void setSocketOption(ServerSocketChannel channel, SocketOption<T> name, T value)
private <T> void setSocketOption(ServerSocketChannel channel, SocketOption<T> option, T value)
{
try
{
channel.setOption(name, value);
channel.setOption(option, value);
}
catch (Throwable t)
catch (Throwable x)
{
LOG.warn("Unable to set socket option {} to {}", name, value, t);
if (LOG.isDebugEnabled())
LOG.debug("Could not configure {} to {} on {}", option, value, channel, x);
}
}

Expand Down

0 comments on commit 54edcef

Please sign in to comment.