Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 62B03200C6F for ; Tue, 25 Apr 2017 04:03:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 61523160B99; Tue, 25 Apr 2017 02:03:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A783A160BA5 for ; Tue, 25 Apr 2017 04:03:07 +0200 (CEST) Received: (qmail 42707 invoked by uid 500); 25 Apr 2017 02:03:06 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 42696 invoked by uid 99); 25 Apr 2017 02:03:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Apr 2017 02:03:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 44ED7C0040 for ; Tue, 25 Apr 2017 02:03:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id KKeTicD8_6tS for ; Tue, 25 Apr 2017 02:03:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id EE06A60CE8 for ; Tue, 25 Apr 2017 02:03:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 50C47E042C for ; Tue, 25 Apr 2017 02:03:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0F01F21B54 for ; Tue, 25 Apr 2017 02:03:04 +0000 (UTC) Date: Tue, 25 Apr 2017 02:03:04 +0000 (UTC) From: "Allen (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (HTTPCORE-455) The client does not check if the IO thread is alive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 25 Apr 2017 02:03:08 -0000 [ https://issues.apache.org/jira/browse/HTTPCORE-455?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Allen reopened HTTPCORE-455: ---------------------------- The latest version of httpcore-nio in maven repository is 4.4.6=EF=BC=8Cthe= worker thread catch exception but not throwable, and the connecting thread= just checked whether an exception happened=E3=80=82Once an unknown error h= appens, the worker thread will stop but the connecting thread will never kn= ow,it seems that the problem dose not be fixed in the 4.4.6=E3=80=82 > The client does not check if the IO thread is alive > --------------------------------------------------- > > Key: HTTPCORE-455 > URL: https://issues.apache.org/jira/browse/HTTPCORE-455 > Project: HttpComponents HttpCore > Issue Type: Bug > Environment: Mac OSX, Java 8 > Reporter: Allen > Fix For: 4.4.7, 5.0-alpha3 > > > When I developed with the latest HttpAsyncclient, it was hard for me to k= now whether the IO thread in BaseIOReactor was alive=E3=80=82 For example, = if I throw an error in the callback=EF=BC=8Cthe IO thread will terminate,bu= t the connecting thread will not check if the IO thread is alive,and will = still add new channels to the dispatcher=E3=80=82 > The java code: > CloseableHttpAsyncClient client =3D HttpAsyncClients.custom().build(); > client.start(); > HttpUriRequest getRequest =3D new HttpGet("www.google.com"); > client.execute(getRequest, new FutureCallback() { > @Override > public void completed(HttpResponse result) { > throw new StackOverflowError(); > } > @Override > public void failed(Exception ex) { > } > @Override > public void cancelled() { > } > }); > for(int i =3D 0 ; i < 100 ; i++){ > client.execute(getRequest, new FutureCallback()= { > @Override > public void completed(HttpResponse result) { > =20 > } > @Override > public void failed(Exception ex) { > } > @Override > public void cancelled() { > } > }); > } > one of the IO threads is dead=EF=BC=8Cbut the java Error dose not be caug= ht=EF=BC=8Cand hte client will continue work and add new channels to the di= spather, but the newChannel queue will be not be consumed, so I want to kno= w is there any method to deal with this situation. > Thanks -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org