Merge remote-tracking branch 'origin/jetty-9.4.x'
This commit is contained in:
commit
4a0569f2dc
|
@ -63,8 +63,8 @@ import org.eclipse.jetty.util.thread.ThreadPool;
|
||||||
* {@link #getLowResourcesIdleTimeout()} to all connections again. Once the low resources state is
|
* {@link #getLowResourcesIdleTimeout()} to all connections again. Once the low resources state is
|
||||||
* cleared, the idle timeout is reset to the connector default given by {@link Connector#getIdleTimeout()}.
|
* cleared, the idle timeout is reset to the connector default given by {@link Connector#getIdleTimeout()}.
|
||||||
* <p>
|
* <p>
|
||||||
* If {@link #setAcceptingInLowResources(boolean)} is set to true, then no new connections are accepted
|
* If {@link #setAcceptingInLowResources(boolean)} is set to false (Default is true), then no new connections
|
||||||
* when in low resources state.
|
* are accepted when in low resources state.
|
||||||
*/
|
*/
|
||||||
@ManagedObject ("Monitor for low resource conditions and activate a low resource mode if detected")
|
@ManagedObject ("Monitor for low resource conditions and activate a low resource mode if detected")
|
||||||
public class LowResourceMonitor extends AbstractLifeCycle
|
public class LowResourceMonitor extends AbstractLifeCycle
|
||||||
|
@ -350,12 +350,13 @@ public class LowResourceMonitor extends AbstractLifeCycle
|
||||||
if (connector instanceof AbstractConnector)
|
if (connector instanceof AbstractConnector)
|
||||||
{
|
{
|
||||||
AbstractConnector c = (AbstractConnector)connector;
|
AbstractConnector c = (AbstractConnector)connector;
|
||||||
if (c.isAccepting())
|
if (!isAcceptingInLowResources() && c.isAccepting())
|
||||||
{
|
{
|
||||||
_acceptingConnectors.add(c);
|
_acceptingConnectors.add(c);
|
||||||
c.setAccepting(false);
|
c.setAccepting(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (EndPoint endPoint : connector.getConnectedEndPoints())
|
for (EndPoint endPoint : connector.getConnectedEndPoints())
|
||||||
endPoint.setIdleTimeout(_lowResourcesIdleTimeout);
|
endPoint.setIdleTimeout(_lowResourcesIdleTimeout);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue