Set the Idle Timeout on jetty connectors to the same as the Request Timeout.
@@ -316,6 +316,9 @@ public class HandleHttpRequest extends AbstractProcessor {
}
http.setPort(port);
+ // If request timeout is longer than default Idle Timeout, then increase Idle Timeout as well.
+ http.setIdleTimeout(Math.max(http.getIdleTimeout(), requestTimeout));
+
// add this connector
server.setConnectors(new Connector[]{http});
} else {
@@ -334,6 +337,9 @@ public class HandleHttpRequest extends AbstractProcessor {
}
https.setPort(port);
+ // If request timeout is longer than default Idle Timeout, then increase Idle Timeout as well.
+ https.setIdleTimeout(Math.max(https.getIdleTimeout(), requestTimeout));
+
// add this connector
server.setConnectors(new Connector[]{https});
}
