[ https://issues.apache.org/jira/browse/HTTPCORE-777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932948#comment-17932948 ]
Oleg Kalnichevski edited comment on HTTPCORE-777 at 3/6/25 11:14 AM: --------------------------------------------------------------------- [~oleksandrkriuchenko] There is a trouble with your reproducer. I need to understand whether what you are doing is intentional or not {code:java} private <R> R withHttpClient(Function<CloseableHttpAsyncClient, R> f) throws IOException { try (CloseableHttpAsyncClient httpclient = buildClient()) { httpclient.start(); R r = f.apply(httpclient); httpclient.close(CloseMode.GRACEFUL); // added by me return r; } } {code} Essentially your code # creates an CloseableHttpAsyncClient # submits a request into the request execution pipeline # lets the connect exec interceptor submit a connect request to the i/o reactor # immediately shuts down the CloseableHttpAsyncClient and its i/o reactor without giving it a chance to act upon the connect request What is your intention here? There is likely no connection at all. There not a chance HttpClient can get a connection reset because there is no connection to start with. Do you expect the client to cancel the request future during its shut down sequence? In this case the bug report looks misleading and is actually misplaced. This is a client level problem, not core. Oleg was (Author: olegk): [~oleksandrkriuchenko] There is a trouble with your reproducer. I need to understand whether what you are doing is intentional or not {code:java} private <R> R withHttpClient(Function<CloseableHttpAsyncClient, R> f) throws IOException { try (CloseableHttpAsyncClient httpclient = buildClient()) { httpclient.start(); R r = f.apply(httpclient); httpclient.close(CloseMode.GRACEFUL); // added by me return r; } } {code} Essentially your code # creates an CloseableHttpAsyncClient # submits a request into the request execution pipeline # lets the connect exec interceptor submit a connect request to the i/o reactor # immediately shuts down the i/o reactor without giving it a chance to act upon the connect request What is your intention here? There is likely no connection at all. There not a chance HttpClient can get a connection reset because there is no connection to start with. Do you expect the client to cancel the request future during its shut down sequence? In this case the bug report looks misleading and is actually misplaced. This is a client level problem, not core. Oleg > CloseableHttpAsyncClient.execute hangs forever upon connection reset > -------------------------------------------------------------------- > > Key: HTTPCORE-777 > URL: https://issues.apache.org/jira/browse/HTTPCORE-777 > Project: HttpComponents HttpCore > Issue Type: Bug > Components: HttpCore > Affects Versions: 5.3.3 > Reporter: Oleksandr Kriuchenko > Priority: Major > > There seems to be an issue with async http client request execution: > if connection is closed during request execution then the future > returned by the CloseableHttpAsyncClient.execute never completes. > Please find a test setup to reproduce the issue (along with the > conditions description under which the issue reproduces) in > [https://github.com/oleksandr-kriuchenko-lohika/httpcore5-issue] -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org