Skip to content

Commit

Permalink
CAMEL-20301: 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 committed Jan 10, 2024
1 parent 30ef0af commit 09fe1c6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,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 @@ -631,7 +632,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 09fe1c6

Please sign in to comment.