Skip to content

Commit

Permalink
Don't delete the SessionsDiagnosticsSummaryTypeNode on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinherron committed Nov 29, 2019
1 parent 0470b42 commit 407dd61
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static com.google.common.base.Preconditions.checkNotNull;

public class DiagnosticsManager extends AbstractLifecycle {

private final Logger logger = LoggerFactory.getLogger(DiagnosticsManager.class);
Expand Down Expand Up @@ -208,6 +210,7 @@ class ServerDiagnosticsObject extends AbstractLifecycle {
private final ServerDiagnosticsTypeNode node;

ServerDiagnosticsObject(ServerDiagnosticsTypeNode node) {
checkNotNull(node, "ServerDiagnosticsTypeNode");
this.node = node;
}

Expand Down Expand Up @@ -303,6 +306,7 @@ class SessionsDiagnosticsSummaryObject extends AbstractLifecycle {
private final SessionsDiagnosticsSummaryTypeNode node;

SessionsDiagnosticsSummaryObject(SessionsDiagnosticsSummaryTypeNode node) {
checkNotNull(node, "SessionsDiagnosticsSummaryTypeNode");
this.node = node;
}

Expand Down Expand Up @@ -358,7 +362,8 @@ protected void onShutdown() {
.forEach(SessionDiagnosticsObject::shutdown);
sessionDiagnosticsObjects.clear();

node.delete();
// The SessionsDiagnosticsSummaryTypeNode is not deleted because it
// should be present whether or not diagnostics are enabled.
}

private void configureSessionSecurityDiagnosticsArray() {
Expand Down

0 comments on commit 407dd61

Please sign in to comment.