Skip to content

Commit

Permalink
Reset Error reason after ConcurrentContainer is stopped
Browse files Browse the repository at this point in the history
Error reason is not cleared after the `ConcurrentContainer` is stopped. 
It is cleared only when the `Reason` is `Auth`. 
This could be problematic if container is again started.
  • Loading branch information
LokeshAlamuri authored Jul 15, 2024
1 parent 49b6c37 commit 45515e9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,11 @@ public void childStopped(MessageListenerContainer child, Reason reason) {
int startedContainersCount = this.startedContainers.decrementAndGet();
if (startedContainersCount == 0) {
publishConcurrentContainerStoppedEvent(this.reason);
if (Reason.AUTH.equals(this.reason)
&& getContainerProperties().isRestartAfterAuthExceptions()) {

this.reason = null;
boolean restartContainer = Reason.AUTH.equals(this.reason)
&& getContainerProperties().isRestartAfterAuthExceptions();
this.reason = null;

if (restartContainer) {
// This has to run on another thread to avoid a deadlock on lifecycleMonitor
AsyncTaskExecutor exec = getContainerProperties().getListenerTaskExecutor();
if (exec == null) {
Expand Down

0 comments on commit 45515e9

Please sign in to comment.