You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Gary Gregory <ga...@gmail.com> on 2018/08/03 20:37:01 UTC

Better timeout info

Hi All:

On a timeout, when processing gets around to calling:

org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onTimeout():

    public final void onTimeout() throws IOException, HttpException {
        if (!handleTimeout()) {
            onException(new SocketTimeoutException());
        }
    }

I'd like it to receive the _actual timeout_ so that I can include it like
this:

            onException(new SocketTimeoutException(timeoutMillis));

Which I can use down the line (onException(...)) for better error reporting.

Are you all OK with that?

Gary

Re: Better timeout info

Posted by Gary Gregory <ga...@gmail.com>.
Roger that.

Gary

On Sat, Aug 4, 2018 at 6:15 AM Oleg Kalnichevski <ol...@apache.org> wrote:

> On Fri, 2018-08-03 at 14:37 -0600, Gary Gregory wrote:
> > Hi All:
> >
> > On a timeout, when processing gets around to calling:
> >
> > org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onTimeo
> > ut():
> >
> >     public final void onTimeout() throws IOException, HttpException {
> >         if (!handleTimeout()) {
> >             onException(new SocketTimeoutException());
> >         }
> >     }
> >
> > I'd like it to receive the _actual timeout_ so that I can include it
> > like
> > this:
> >
> >             onException(new SocketTimeoutException(timeoutMillis));
> >
> > Which I can use down the line (onException(...)) for better error
> > reporting.
> >
> > Are you all OK with that?
> >
> > Gary
>
> Works for me. Please just do consistently across the entire code base.
>
> Cheers
>
> Oleg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>

Re: Better timeout info

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2018-08-03 at 14:37 -0600, Gary Gregory wrote:
> Hi All:
> 
> On a timeout, when processing gets around to calling:
> 
> org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onTimeo
> ut():
> 
>     public final void onTimeout() throws IOException, HttpException {
>         if (!handleTimeout()) {
>             onException(new SocketTimeoutException());
>         }
>     }
> 
> I'd like it to receive the _actual timeout_ so that I can include it
> like
> this:
> 
>             onException(new SocketTimeoutException(timeoutMillis));
> 
> Which I can use down the line (onException(...)) for better error
> reporting.
> 
> Are you all OK with that?
> 
> Gary

Works for me. Please just do consistently across the entire code base.

Cheers

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org