Skip to content

Commit f0fd001

Browse files
author
Stephane Landelle
committed
Make AsyncHttpClient Closeable in 1.7.x, close AsyncHttpClient#44
1 parent 560c90b commit f0fd001

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/ning/http/client/AsyncHttpClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.slf4j.Logger;
2626
import org.slf4j.LoggerFactory;
2727

28+
import java.io.Closeable;
2829
import java.io.IOException;
2930
import java.io.InputStream;
3031
import java.util.Collection;
@@ -138,7 +139,7 @@
138139
* An instance of this class will cache every HTTP 1.1 connections and close them when the {@link AsyncHttpClientConfig#getIdleConnectionTimeoutInMs()}
139140
* expires. This object can hold many persistent connections to different host.
140141
*/
141-
public class AsyncHttpClient {
142+
public class AsyncHttpClient implements Closeable {
142143

143144
private final static String DEFAULT_PROVIDER = "com.ning.http.client.providers.netty.NettyAsyncHttpProvider";
144145
private final AsyncHttpProvider httpProvider;

0 commit comments

Comments
 (0)