On Wed, Aug 23, 2017 at 3:26 PM, Oleg Kalnichevski <[email protected]> wrote:
> On Wed, 2017-08-23 at 10:49 -0600, Gary Gregory wrote: > > Hi All: > > > > In HC Core4, I have a use case where the method > > org.apache.http.nio.protocol.HttpAsyncService.timeout(NHttpServerConn > > ection) > > is called when HC Core detects that a session has not been used in a > > while > > (the timeout value). > > > > In HttpAsyncService.timeout(NHttpServerConnection), we then create a > > SocketTimeoutException and pass it on. > > > > This has created some confusion further on down the processing when > > the > > log(Exception) method is called and > > my org.apache.http.ExceptionLogger.log(Exception) ends up being > > called. > > > > How can I tell the difference between a real timeout and one of these > > manufactured timeouts. > > > > I wonder if we should create our own subclass of > > SocketTimeoutException > > called SessionTimeoutException and use that > > HttpAsyncService.timeout(NHttpServerConnection) instead of > > SocketTimeoutException. This would make it backward compatible for > > implementations that do instanceof SocketTimeoutException checks. > > > > This would let my logging log SocketTimeoutException as ERRORs and > > SessionTimeoutException as DEBUG. > > > > Thoughts? > > > > Gary > > Gary > > All SocketTimeoutException thrown by non-blocking i/o classes are > manufactured. What you call 'real' timeouts can only be thrown by JRE > blocking i/o code. I personally see no good reason to > distinguish SocketTimeoutException thrown by JRE code and those thrown > by i/o reactors. They can never get mixed up. > That's what I needed to know! Any thoughts on when to push HcCore 4.4.7? Thank you, Gary > > Oleg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
