[ https://issues.apache.org/jira/browse/HTTPCORE-719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17569405#comment-17569405 ]
Oleg Kalnichevski edited comment on HTTPCORE-719 at 7/21/22 1:02 PM: --------------------------------------------------------------------- [~icruz] {code:java} @Override public void close(CloseMode closeMode) { impl.close(); // WRONG!!! } {code} Essentially your decorated session always attempts to do a graceful close even when it is not supposed to. Correcting the method fixes the problem for me. Oleg was (Author: olegk): [~icruz] {code:java} @Override public void close(CloseMode closeMode) { impl.close(); // WRONG!!! } } {code} Essentially your decorated session always attempts to do a graceful close even when it is not supposed to. Correcting the method fixes the problem for me. Oleg > Infinite loop when setIOSessionDecorator() is used > -------------------------------------------------- > > Key: HTTPCORE-719 > URL: https://issues.apache.org/jira/browse/HTTPCORE-719 > Project: HttpComponents HttpCore > Issue Type: Bug > Components: HttpCore NIO > Affects Versions: 5.1.4 > Reporter: Isaac Cruz Ballesteros > Priority: Major > Attachments: infiniteLoop.zip > > > Initializing an async HTTPS server with setIOSessionDecorator makes library > to enter on an infinite loop with following exception when client closes > connection abruptly: > {noformat} > java.net.SocketException: Connection reset > at > sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:367) > ~[?:?] > at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:383) ~[?:?] > at org.apache.hc.core5.reactor.IOSessionImpl.read(IOSessionImpl.java:202) > ~[httpcore5-5.1.4.jar:5.1.4] > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.receiveEncryptedData(SSLIOSession.java:519) > ~[httpcore5-5.1.4.jar:5.1.4] > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.access$200(SSLIOSession.java:72) > ~[httpcore5-5.1.4.jar:5.1.4] > at > org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:170) > ~[httpcore5-5.1.4.jar:5.1.4] > at > org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:133) > [httpcore5-5.1.4.jar:5.1.4] > at > org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51) > [httpcore5-5.1.4.jar:5.1.4] > at > org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178) > [httpcore5-5.1.4.jar:5.1.4] > at > org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127) > [httpcore5-5.1.4.jar:5.1.4] > at > org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85) > [httpcore5-5.1.4.jar:5.1.4] > at > org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44) > [httpcore5-5.1.4.jar:5.1.4] > at java.lang.Thread.run(Thread.java:832) [?:?]{noformat} > I have attached a maven project with a simple example, it initializes server > and connects from a client. It reproduces when client does not consume what > server writes. > If you comment out line 75 of HttpsServer.java, then it works correctly. -- 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