diff --git a/CHANGELOG.md b/CHANGELOG.md
index d729a265..2071f3cb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Splunk Logging for Java Changelog
+## Version 1.7.2
+
+* Closing httpclient properly on logback shutdown [#112](https://github.com/splunk/splunk-library-javalogging/pull/112).
+
## Version 1.7.1
* Change HttpEventCollectorLogbackAppender stop method to call this.sender.close() [#93](https://github.com/splunk/splunk-library-javalogging/pull/93).
@@ -11,8 +15,8 @@
## Version 1.6.2
-* Add support to allow users to define their own event body serializer for HTTP event adapter: Simply create a class implementing `com.splunk.logging.EventBodySerializer`,
-and add the full class name as a property (`eventBodySerializer`) to the adapter.
+* Add support to allow users to define their own event body serializer for HTTP event adapter: Simply create a class implementing `com.splunk.logging.EventBodySerializer`,
+and add the full class name as a property (`eventBodySerializer`) to the adapter.
Default will be a JSON event body containing message, severity, and other properties. [#86](https://github.com/splunk/splunk-library-javalogging/pull/86).
## Version 1.6.1
diff --git a/README.md b/README.md
index 44ddd837..d06cbf02 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Splunk Logging for Java
-#### Version 1.7.1
+#### Version 1.7.2
Splunk logging for Java enables you to log events to HTTP Event Collector or to a TCP input on a Splunk Enterprise instance within your Java applications. You can use three major Java logging frameworks: [Logback](http://logback.qos.ch), [Log4j 2](http://logging.apache.org/log4j/2.x/), and [java.util.logging](https://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html). Splunk logging for Java is also enabled for [Simple Logging Facade for Java (SLF4J)](http://www.slf4j.org).
@@ -18,16 +18,16 @@ Splunk logging for Java provides:
## Documentation and resources
-* For more information about installing and using Splunk logging for Java, see
+* For more information about installing and using Splunk logging for Java, see
[Overview of Splunk logging for Java](http://dev.splunk.com/goto/sdk-slj).
-* For reference documentation, see the
+* For reference documentation, see the
[Splunk logging for Java API reference](https://docs.splunk.com/DocumentationStatic/JavaLogging/1.6.2/index.html).
-* For all things developer with Splunk, see the
+* For all things developer with Splunk, see the
[Splunk Developer Portal](http://dev.splunk.com).
-* For more about about Splunk in general, see
+* For more about about Splunk in general, see
[Splunk>Docs](http://docs.splunk.com/Documentation/Splunk).
## License
@@ -38,12 +38,12 @@ See the [LICENSE file](/license.md) for details.
## Contributions
-[Get the Splunk Java Logging Framework from GitHub](https://github.com/splunk/splunk-library-javalogging)
-and clone the resources to your computer. For example, use the following
-command:
+[Get the Splunk Java Logging Framework from GitHub](https://github.com/splunk/splunk-library-javalogging)
+and clone the resources to your computer. For example, use the following
+command:
git clone https://github.com/splunk/splunk-library-javalogging.git
-
+
## Support
The Splunk logging for Java is community-supported.
diff --git a/pom.xml b/pom.xml
index 283bfacf..80b67e57 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.splunk.logging
splunk-library-javalogging
- 1.7.1
+ 1.7.2
jar
Splunk Logging for Java
diff --git a/src/main/java/com/splunk/logging/HttpEventCollectorSender.java b/src/main/java/com/splunk/logging/HttpEventCollectorSender.java
index 8d9d8785..39ff893a 100644
--- a/src/main/java/com/splunk/logging/HttpEventCollectorSender.java
+++ b/src/main/java/com/splunk/logging/HttpEventCollectorSender.java
@@ -204,6 +204,8 @@ public synchronized void flush() {
public synchronized void flush(boolean close) {
if (eventsBatch.size() > 0) {
postEventsAsync(eventsBatch, close);
+ } else if (close) {
+ this.stopHttpClient();
}
// Clear the batch. A new list should be created because events are
// sending asynchronously and "previous" instance of eventsBatch object