NO-JIRA Avoid NPE during backup shutdown
When a backup starts without a live, it's nodeID is null. Added a null check in ClusterConnection's stop() to avoid NPE if it's shut down.
This commit is contained in:
parent
54cfeed918
commit
375f383e90
|
@ -439,7 +439,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
|
|||
if (managementService != null) {
|
||||
TypedProperties props = new TypedProperties();
|
||||
props.putSimpleStringProperty(new SimpleString("name"), name);
|
||||
Notification notification = new Notification(nodeManager.getNodeId().toString(), CoreNotificationType.CLUSTER_CONNECTION_STOPPED, props);
|
||||
//nodeID can be null if there's only a backup
|
||||
SimpleString nodeId = nodeManager.getNodeId();
|
||||
Notification notification = new Notification(nodeId == null ? null : nodeId.toString(), CoreNotificationType.CLUSTER_CONNECTION_STOPPED, props);
|
||||
managementService.sendNotification(notification);
|
||||
}
|
||||
executor.execute(new Runnable() {
|
||||
|
|
Loading…
Reference in New Issue