Skip to content

Commit

Permalink
CAMEL-20231: clear the services on initialization (#12722)
Browse files Browse the repository at this point in the history
This should prevent running out of memory due to constantly increasing the service list
  • Loading branch information
orpiske authored Jan 9, 2024
1 parent 92be6f6 commit 74b6e19
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ public String getSourceLocationShort() {

@Override
public void initializeServices() throws Exception {
services.clear();
// gather all the services for this route
gatherServices(services);
}
Expand Down Expand Up @@ -634,7 +635,7 @@ protected void gatherServices(List<Service> services) throws Exception {
}
}

protected void gatherRootServices(List<Service> services) throws Exception {
private void gatherRootServices(List<Service> services) throws Exception {
Endpoint endpoint = getEndpoint();
consumer = endpoint.createConsumer(processor);
if (consumer != null) {
Expand Down

0 comments on commit 74b6e19

Please sign in to comment.