Skip to content

Commit

Permalink
merge: #8014
Browse files Browse the repository at this point in the history
8014: fix NPE in startup r=deepthidevaki a=pihme

## Description

Fixes NPE during startup in case a parallel shutdown was running

## Related issues

closes #7991

## Review Hints
Fixed directly in `stable/1.2` because this error cannot should not happen in develop. On develop, startup is interrupted between startup steps, and only then does shutdown start



Co-authored-by: pihme <pihme@users.noreply.github.com>
  • Loading branch information
zeebe-bors-cloud[bot] and pihme authored Oct 18, 2021
2 parents 322f144 + 6b67e13 commit 2660fef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion broker/src/main/java/io/camunda/zeebe/broker/Broker.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ private void internalStart() {
try {
closeProcess = startProcess.start();
startFuture.complete(this);
healthCheckService.setBrokerStarted();
if (healthCheckService != null) { // can be null if shutdown was called concurrently
healthCheckService.setBrokerStarted();
}
} catch (final Exception bootStrapException) {
final BrokerCfg brokerCfg = getConfig();
LOG.error(
Expand Down

0 comments on commit 2660fef

Please sign in to comment.