Re: [asio-users] asio + URDL: understanding tcp connect errors
Brought to you by:
chris_kohlhoff
From: Christopher K. <ch...@ko...> - 2009-07-27 07:20:57
|
On Wed, 22 Jul 2009 10:40 +0200, "Jose" <jm...@gm...> wrote: > On Wed, Jul 22, 2009 at 9:58 AM, Christopher Kohlhoff<ch...@ko...> > wrote: > > > TCP should already retry a connection after 10s (from memory). However, > > I'd consider adding something like a min_connect_tries property that > > would put a floor on the number of iterations in async_connect() for > > sites with a small number of addresses. > > I think I didn't communicate properly. I meant having a way to retry > temporary errors beyond what TCP does. > This is a feature request for URDL rather than asio. Yes, I know. I was referring to async_connect in include/urdl/detail/connect.hpp. What I meant was adding an additional test to the for-loop based on a min_connect_tries property. It will keep trying if there have been too few attempts. > Wouldn't it be better to have: > > - a connection timeout (which can indicate a connection to be retried) In time I will consider adding a connection timeout. > - an open timeout (after the connection is open - this could be > retried also, it would occur in overloaded servers) I think the current "open" timeout is better than a timeout "after the connection is open". For the client program's control flow, it is simpler to timeout after the overall request is initiated, i.e. a deadline. > > Perhaps, but I think a status callback indicating what stage it is up to > > would be more useful for that. Then the client software would be in a > > better position to know whether what had happened so far may have had > > any side effects, and whether it can safely re-issue the request. > > YES. Can you elaborate ? Will this be available ? All in due course :) Cheers, Chris |