From 5e567b39ecf9c6fe19694222ba804cf264b0740f Mon Sep 17 00:00:00 2001 From: keydam Date: Thu, 2 Mar 2023 15:29:10 +0100 Subject: [PATCH] Pull request concerning issue #117 (#118) * bugfix in PrometheusServer.java to close the server after the delay * bugfix in PrometheusListener.java to clear the collectors after the server is closed. --- CHANGELOG.md | 4 ++++ .../com/github/johrstrom/listener/PrometheusListener.java | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddaa620..e859c9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.6.2 + +* #117 is a bugfix in PrometheusListener.java to clear the collectors after the server is closed. + # 0.6.1 * #116 is a bugfix in PrometheusServer.java to close the server after the delay. diff --git a/src/main/java/com/github/johrstrom/listener/PrometheusListener.java b/src/main/java/com/github/johrstrom/listener/PrometheusListener.java index 9f43112..23278cc 100644 --- a/src/main/java/com/github/johrstrom/listener/PrometheusListener.java +++ b/src/main/java/com/github/johrstrom/listener/PrometheusListener.java @@ -103,13 +103,13 @@ public void sampleStopped(SampleEvent arg0) { */ @Override public void testEnded() { - this.clearCollectors(); - try { this.server.stop(); } catch (Exception e) { log.error("Couldn't stop http server", e); } + + this.clearCollectors(); } /*