|
|
@ -809,14 +809,20 @@ public class ServerProperties
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void customizeConnectionTimeout(
|
|
|
|
private void customizeConnectionTimeout(
|
|
|
|
TomcatEmbeddedServletContainerFactory factory, int connectionTimeout) {
|
|
|
|
TomcatEmbeddedServletContainerFactory factory,
|
|
|
|
for (Connector connector : factory.getAdditionalTomcatConnectors()) {
|
|
|
|
final int connectionTimeout) {
|
|
|
|
if (connector.getProtocolHandler() instanceof AbstractProtocol) {
|
|
|
|
factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
|
|
|
|
AbstractProtocol<?> handler = (AbstractProtocol<?>) connector
|
|
|
|
|
|
|
|
.getProtocolHandler();
|
|
|
|
@Override
|
|
|
|
handler.setConnectionTimeout(connectionTimeout);
|
|
|
|
public void customize(Connector connector) {
|
|
|
|
|
|
|
|
ProtocolHandler handler = connector.getProtocolHandler();
|
|
|
|
|
|
|
|
if (handler instanceof AbstractProtocol) {
|
|
|
|
|
|
|
|
AbstractProtocol<?> protocol = (AbstractProtocol<?>) handler;
|
|
|
|
|
|
|
|
protocol.setConnectionTimeout(connectionTimeout);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void customizeRemoteIpValve(ServerProperties properties,
|
|
|
|
private void customizeRemoteIpValve(ServerProperties properties,
|
|
|
|