我在以下代码中使用org.asynchttpclient.async-http-client version 2.2.0
:
public class Application
{
public static void main(String[] args) throws InterruptedException, ExecutionException, IOException
{
AsyncHttpClient httpClient = null;
AsyncHttpClientConfig config =
Dsl.config()
.setConnectTimeout(1000)
.setRequestTimeout(5000)
.setKeepAlive(true)
.build();
try {
httpClient = Dsl.asyncHttpClient(config);
String url ="https://www.google.com";
Response r = httpClient.prepareGet(url).execute().get();
String result = r.getResponseBody(Charset.forName("UTF-8"));
System.out.println(result.toString());
} finally {
ClientStats stats = httpClient.getClientStats();
System.out.println(stats);
httpClient.close();
stats = httpClient.getClientStats();
System.out.println(stats);
}
}
}
该程序运行良好,可以检索Google HTML,但不会退出。它会无限期挂起,直到有人将其杀死。似乎以某种方式httpClient.close();
并没有释放所有资源,因此虚拟机保持活动状态。
这是执行日志:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/home/u096285/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/home/u096285/.m2/repository/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
19:27:42.837 [main] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework
19:27:42.849 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.level: simple
19:27:42.851 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.targetRecords: 4
19:27:42.921 [main] DEBUG io.netty.util.internal.PlatformDependent - Platform: Windows
19:27:42.924 [main] DEBUG io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
19:27:42.925 [main] DEBUG io.netty.util.internal.PlatformDependent0 - Java version: 8
19:27:42.927 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
19:27:42.928 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
19:27:42.929 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
19:27:42.930 [main] DEBUG io.netty.util.internal.PlatformDependent0 - direct buffer constructor: available
19:27:42.932 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
19:27:42.932 [main] DEBUG io.netty.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable prior to Java9
19:27:42.932 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): available
19:27:42.932 [main] DEBUG io.netty.util.internal.PlatformDependent - sun.misc.Unsafe: available
19:27:42.933 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.tmpdir: C:\Users\u096285\AppData\Local\Temp (java.io.tmpdir)
19:27:42.933 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
19:27:42.935 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
19:27:42.936 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: 1879048192 bytes
19:27:42.936 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1
19:27:42.937 [main] DEBUG io.netty.util.internal.CleanerJava6 - java.nio.ByteBuffer.cleaner(): available
19:27:42.938 [main] DEBUG io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@71c7db30
19:27:42.962 [main] DEBUG io.netty.util.internal.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
19:27:43.721 [main] DEBUG io.netty.handler.ssl.JdkSslContext - Default protocols (JDK): [TLSv1.2, TLSv1.1, TLSv1]
19:27:43.721 [main] DEBUG io.netty.handler.ssl.JdkSslContext - Default cipher suites (JDK): [TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA]
19:27:43.781 [main] DEBUG io.netty.channel.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 8
19:27:43.791 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
19:27:43.791 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
19:27:43.837 [main] DEBUG io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
19:27:43.837 [main] DEBUG io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 8
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 8
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
19:27:43.847 [main] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.useCacheForAllThreads: true
19:27:43.855 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: pooled
19:27:43.855 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 65536
19:27:43.855 [main] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384
19:27:44.015 [main] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.processId: 13112 (auto-detected)
19:27:44.017 [main] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv4Stack: false
19:27:44.017 [main] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv6Addresses: false
19:27:44.213 [main] DEBUG io.netty.util.NetUtil - Loopback interface: lo (Software Loopback Interface 1, 127.0.0.1)
19:27:44.214 [main] DEBUG io.netty.util.NetUtil - Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200
19:27:44.426 [main] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.machineId: e8:2a:ea:ff:fe:2c:cf:9a (auto-detected)
19:27:44.475 [AsyncHttpClient-2-1] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.bytebuf.checkAccessible: true
19:27:44.475 [AsyncHttpClient-2-1] DEBUG io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@58ef4cc
19:27:44.533 [AsyncHttpClient-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacityPerThread: 32768
19:27:44.533 [AsyncHttpClient-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxSharedCapacityFactor: 2
19:27:44.533 [AsyncHttpClient-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.linkCapacity: 16
19:27:44.533 [AsyncHttpClient-2-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.ratio: 8
19:27:44.620 [AsyncHttpClient-2-1] DEBUG org.asynchttpclient.netty.channel.NettyConnectListener - Using new Channel '[id: 0x04f0b68b, L:/10.23.78.87:65044 - R:www.google.com/172.217.17.4:443]' for 'GET' to '/'
19:27:44.640 [AsyncHttpClient-2-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0x04f0b68b, L:/10.23.78.87:65044 - R:www.google.com/172.217.17.4:443] HANDSHAKEN: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
19:27:44.700 [AsyncHttpClient-2-1] DEBUG org.asynchttpclient.netty.handler.HttpHandler -
Request DefaultFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: EmptyByteBufBE)
GET / HTTP/1.1
host: www.google.com
accept: */*
user-agent: AHC/2.1
Response DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK
Date: Wed, 19 Jun 2019 17:27:44 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
Server: gws
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
Set-Cookie: 1P_JAR=2019-06-19-17; expires=Fri, 19-Jul-2019 17:27:44 GMT; path=/; domain=.google.com
Set-Cookie: NID=186=f79HtEZwEwn8ivi3Y0dp6reZ6S6cA6wILrGF9RfPB1yxf5M8LDWVS4ahdsmHzVh3nAAmjXTPJSrMeQCNSlR7xYirMDJJ8Dz2PIBSrCPdjwF1UIRwK1VyfKTqQZO5ke-HyldO4-BIvU1QFJ5ZdzdruCti4TeqQVgCpXexuJ9mAwI; expires=Thu, 19-Dec-2019 17:27:44 GMT; path=/; domain=.google.com; HttpOnly
Alt-Svc: quic=":443"; ma=2592000; v="46,44,43,39"
Accept-Ranges: none
Vary: Accept-Encoding
Transfer-Encoding: chunked
19:27:44.729 [AsyncHttpClient-2-1] DEBUG org.asynchttpclient.netty.channel.ChannelManager - Adding key: https://www.google.com:443 for channel [id: 0x04f0b68b, L:/10.23.78.87:65044 - R:www.google.com/172.217.17.4:443]
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="es"><head><meta content="Google.es permite acceder a la informaci�n mundial en castellano, catal�n, gallego, euskara e ingl�s." name="description"><meta content="noodp" name="robots"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google</title><script nonce="9zpfk6cQAFKT2oKUnz+PKg==">(function(){window.google={kEI:'kHAKXfLOJteLjLsPnNyjwAk',kEXPI:'0,1353804,1958,1641,781,1225,590,141,223,1575,3152,56,152,170,206,1017,175,947,293,69,220,20,21,2331894,329485,1294,12383,4855,32692,2074,13173,867,12163,16520,365,3319,1262,4243,2442,260,5107,575,835,284,2,204,375,727,2431,1362,283,4040,4968,773,2252,4736,6,7,3111,2595,1929,1672,669,1050,1808,1397,81,7,491,620,29,1395,8910,4603,693,796,1220,38,920,754,119,1217,1364,1611,2736,3061,2,632,3239,44,4148,634,1161,1447,634,1137,1089,656,18,320,1118,447,415,42,101,86,2,1159,777,1,368,1319,703,758,96,36,2,354,30,399,992,509,598,10,168,8,109,187,831,1042,453,1063,78,48,459,94,11,14,10,1269,1831,381,25,177,323,5,1245,7,298,542,324,193,531,371,564,24,32,820,1661,340,619,818,109,151,1189,2,7,7,1348,148,553,606,778,355,373,1,324,8,159,25,366,229,943,239,520,21,339,698,18,268,472,121,257,306,194,29,192,24,72,112,228,115,5,798,319,9,31,1253,40,60,135,37,164,81,507,606,250,427,99,16,397,124,147,47,569,155,79,404,29,347,811,132,506,3,108,85,349,22,2,4,760,229,228,121,8,268,433,5922925,2963,8797377,4,1572,549,333,444,1,2,80,1,900,583,9,304,1,8,1,2,2132,1,1,1,1,1,414,1,748,141,59,726,3,7,563,1,2346,241,30,33,13,33,33,25,71',authuser:0,kscs:'c9c918f0_kHAKXfLOJteLjLsPnNyjwAk',kGL:'ES'};google.sn='webhp';google.kHL='es';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI};google.getLEI=function(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b};google.https=function(){return"https:"==window.location.protocol};google.ml=function(){return null};google.time=function(){return(new Date).getTime()};google.log=function(a,b,e,c,g){if(a=google.logUrl(a,b,e,c,g)){b=new Image;var d=google.lc,f=google.li;d[f]=b;b.onerror=b.onload=b.onabort=function(){delete d[f]};google.vel&&google.vel.lu&&google.vel.lu(a);b.src=a;google.li=f+1}};google.logUrl=function(a,b,e,c,g){var d="",f=google.ls||"";e||-1!=b.search("&ei=")||(d="&ei="+google.getEI(c),-1==b.search("&lei=")&&(c=google.getLEI(c))&&(d+="&lei="+c));c="";!e&&google.cshid&&-1==b.search("&cshid=")&&"slh"!=a&&(c="&cshid="+google.cshid);a=e||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+d+f+"&zx="+google.time()+c;/^http:/i.test(a)&&google.https()&&(google.ml(Error("a"),!1,{src:a,glmm:1}),a="");return a};}).call(this);(function(){google.y={};google.x=function(a,b){if(a)var c=a.id;else{do c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.lm=[];google.plm=function(a){google.lm.push.apply(google.lm,a)};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);google.f={};var a=window.location,b=a.href.indexOf("#");if(0<=b){var c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-1==c.indexOf("#")&&a.replace("/search?"+c.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h")};</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#36c}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c !important}body{background:#fff;color:black}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}a.gb1,a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}#ghead a.gb2:hover{color:#fff !important}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px}.lsbb{display:block}.ftl,#fll a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}</style><script nonce="9zpfk6cQAFKT2oKUnz+PKg=="></script></head><body bgcolor="#fff"><script nonce="9zpfk6cQAFKT2oKUnz+PKg==">(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
}
})();</script><div id="mngb"> <div id=gbar><nobr><b class=gb1>B�squeda</b> <a class=gb1 href="https://www.google.es/imghp?hl=es&tab=wi">Im�genes</a> <a class=gb1 href="https://maps.google.es/maps?hl=es&tab=wl">Maps</a> <a class=gb1 href="https://play.google.com/?hl=es&tab=w8">Play</a> <a class=gb1 href="https://www.youtube.com/?gl=ES&tab=w1">YouTube</a> <a class=gb1 href="https://news.google.es/nwshp?hl=es&tab=wn">Noticias</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">Drive</a> <a class=gb1 style="text-decoration:none" href="https://www.google.es/intl/es/about/products?tab=wh"><u>M�s</u> »</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.es/history/optout?hl=es" class=gb4>Historial web</a> | <a href="/preferences?hl=es" class=gb4>Configuraci�n</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=es&passive=true&continue=https://www.google.com/" class=gb4>Iniciar sesi�n</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div> </div><center><br clear="all" id="lgpd"><div id="lga"><img alt="Google" height="92" src="/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png" style="padding:28px 0 14px" width="272" id="hplogo" onload="window.lol&&lol()"><br><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%"> </td><td align="center" nowrap=""><input name="ie" value="ISO-8859-1" type="hidden"><input value="es" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><input name="biw" type="hidden"><input name="bih" type="hidden"><div class="ds" style="height:32px;margin:4px 0"><input style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top" autocomplete="off" class="lst" value="" title="Buscar con Google" maxlength="2048" name="q" size="57"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Buscar con Google" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" value="Voy a tener suerte" name="btnI" onclick="if(this.form.q.value)this.checked=1; else top.location='/doodles/'" type="submit"></span></span></td><td class="fl sblc" align="left" nowrap="" width="25%"><a href="/advanced_search?hl=es&authuser=0">B�squeda avanzada</a><a href="/language_tools?hl=es&authuser=0">Herramientas del idioma</a></td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"><script nonce="9zpfk6cQAFKT2oKUnz+PKg==">(function(){var a,b="1";if(document&&document.getElementById)if("undefined"!=typeof XMLHttpRequest)b="2";else if("undefined"!=typeof ActiveXObject){var c,d,e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(c=0;d=e[c++];)try{new ActiveXObject(d),b="2"}catch(h){}}a=b;if("2"==a&&-1==location.search.indexOf("&gbv=2")){var f=google.gbvu,g=document.getElementById("gbv");g&&(g.value=a);f&&window.setTimeout(function(){location.href=f},0)};}).call(this);</script></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br><div id="gws-output-pages-elements-homepage_additional_languages__als"><style>#gws-output-pages-elements-homepage_additional_languages__als{font-size:small;margin-bottom:24px}#SIvCob{display:inline-block;line-height:28px;}#SIvCob a{padding:0 3px;}.H6sW5{display:inline-block;margin:0 2px;white-space:nowrap}.z4hgWe{display:inline-block;margin:0 2px}</style><div id="SIvCob">Ofrecido por Google en: <a href="https://www.google.com/setprefs?sig=0_hOi30AobPGolNqaKkBvXoZLgEXk%3D&hl=ca&source=homepage&sa=X&ved=0ahUKEwjy1uvgiPbiAhXXBWMBHRzuCJgQ2ZgBCAU">catal�</a> <a href="https://www.google.com/setprefs?sig=0_hOi30AobPGolNqaKkBvXoZLgEXk%3D&hl=gl&source=homepage&sa=X&ved=0ahUKEwjy1uvgiPbiAhXXBWMBHRzuCJgQ2ZgBCAY">galego</a> <a href="https://www.google.com/setprefs?sig=0_hOi30AobPGolNqaKkBvXoZLgEXk%3D&hl=eu&source=homepage&sa=X&ved=0ahUKEwjy1uvgiPbiAhXXBWMBHRzuCJgQ2ZgBCAc">euskara</a> </div></div></div><span id="footer"><div style="font-size:10pt"><div style="margin:19px auto;text-align:center" id="fll"><a href="/intl/es/ads/">Programas de publicidad</a><a href="http://www.google.es/intl/es/services/">Soluciones Empresariales</a><a href="/intl/es/about.html">Todo acerca de Google</a><a href="https://www.google.com/setprefdomain?prefdom=ES&prev=https://www.google.es/&sig=K_tBEma-1zL6bnhuIitvXDPwjQthc%3D">Google.es</a></div></div><p style="color:#767676;font-size:8pt">© 2019 - <a href="/intl/es/policies/privacy/">Privacidad</a> - <a href="/intl/es/policies/terms/">Condiciones</a></p></span></center><script nonce="9zpfk6cQAFKT2oKUnz+PKg==">(function(){window.google.cdo={height:0,width:0};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b){var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body;a=d.clientWidth;b=d.clientHeight}a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();(function(){var u='/xjs/_/js/k\x3dxjs.hp.en.ubKvDBDxdWw.O/m\x3dsb_he,d/am\x3d4KAW/d\x3d1/rs\x3dACT90oEwGwcda780WoUEhug97Gz_Jjn42g';setTimeout(function(){var a=document.createElement("script");a.src=u;google.timers&&google.timers.load&&google.tick&&google.tick("load","xjsls");document.body.appendChild(a)},0);})();(function(){window.google.xjsu='/xjs/_/js/k\x3dxjs.hp.en.ubKvDBDxdWw.O/m\x3dsb_he,d/am\x3d4KAW/d\x3d1/rs\x3dACT90oEwGwcda780WoUEhug97Gz_Jjn42g';})();function _DumpException(e){throw e;}
function _F_installCss(c){}
(function(){google.spjs=false;google.snet=true;google.em=[];google.emw=false;})();google.sm=1;(function(){var pmc='{\x22Qnk92g\x22:{},\x22RWGcrA\x22:{},\x22U5B21g\x22:{},\x22YFCs/g\x22:{},\x22ZI/YVQ\x22:{},\x22d\x22:{},\x22mVopag\x22:{},\x22sb_he\x22:{\x22agen\x22:true,\x22cgen\x22:true,\x22client\x22:\x22heirloom-hp\x22,\x22dh\x22:true,\x22dhqt\x22:true,\x22ds\x22:\x22\x22,\x22ffql\x22:\x22es\x22,\x22fl\x22:true,\x22host\x22:\x22google.com\x22,\x22isbh\x22:28,\x22jsonp\x22:true,\x22lm\x22:true,\x22msgs\x22:{\x22cibl\x22:\x22Borrar b�squeda\x22,\x22dym\x22:\x22Quiz�s quisiste decir:\x22,\x22lcky\x22:\x22Voy a tener suerte\x22,\x22lml\x22:\x22M�s informaci�n\x22,\x22oskt\x22:\x22Herramientas de introducci�n de texto\x22,\x22psrc\x22:\x22Esta b�squeda se ha eliminado de tu \\u003Ca href\x3d\\\x22/history\\\x22\\u003Ehistorial web\\u003C/a\\u003E.\x22,\x22psrl\x22:\x22Eliminar\x22,\x22sbit\x22:\x22Buscar por imagen\x22,\x22srch\x22:\x22Buscar con Google\x22},\x22ovr\x22:{},\x22pq\x22:\x22\x22,\x22refpd\x22:true,\x22rfs\x22:[],\x22sbpl\x22:24,\x22sbpr\x22:24,\x22scd\x22:10,\x22sce\x22:5,\x22stok\x22:\x22jQgBJxeAAuUyjdH7C8biGO51e-o\x22,\x22uhde\x22:false}}';google.pmc=JSON.parse(pmc);})();</script> </body></html>
There are 1 total connections, 0 are active and 1 are idle.
There are 0 total connections, 0 are active and 0 are idle.
19:27:46.869 [AsyncHttpClient-2-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 14 thread-local buffer(s) from thread: AsyncHttpClient-2-1
这是最简单的代码版本。我显然是从它的异步版本开始的,结果相同。
如您所见,关闭httpclient后,统计信息显示没有连接,无论是活动还是空闲。
我在做什么错了?