Issue #6661 - Make ServerConnector socket options setting optional

This commit is contained in:
Joakim Erdfelt 2021-08-24 16:45:06 -05:00
parent ec842078a2
commit 54edcefd66
2 changed files with 6 additions and 5 deletions

View File

@ -486,7 +486,7 @@ public class ClientConnector extends ContainerLifeCycle
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);
}
}

View File

@ -349,15 +349,16 @@ public class ServerConnector extends AbstractNetworkConnector
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);
}
}