Skip to content

Commit

Permalink
bugfix: disable monitoring collection before server shuts down
Browse files Browse the repository at this point in the history
  • Loading branch information
lprimak committed Aug 9, 2024
1 parent 89d6c49 commit 4ddb099
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2020-2021 Payara Foundation and/or its affiliates. All rights reserved.
* Copyright (c) 2020-2024 Payara Foundation and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
Expand Down Expand Up @@ -168,6 +168,8 @@ public void postConstruct() {
public void event(Event<?> event) {
if (event.is(EventTypes.SERVER_READY)) {
init();
} else if (event.is(EventTypes.PREPARE_SHUTDOWN)) {
setEnabled(false);
}
}

Expand Down

0 comments on commit 4ddb099

Please sign in to comment.