- don't start a basic valve when adding it to the pipeline if the pipeline is not started
- if pipeline is started when adding a basic valve, register the basic valve
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@919722
13f79535-47bb-0310-9956-
ffa450edef68
if (valve instanceof Contained) {
((Contained) valve).setContainer(this.container);
}
- if (valve instanceof Lifecycle) {
+ if (getState().isAvailable() && valve instanceof Lifecycle) {
try {
((Lifecycle) valve).start();
} catch (LifecycleException e) {
log.error("StandardPipeline.setBasic: start", e);
return;
}
+ // Register the newly added valve
+ registerValve(valve);
}
// Update the pipeline