[sr-dev] handling failed t_relay() when multiple usr locations
Andrei Pelinescu-Onciul
andrei at iptel.org
Tue Mar 9 09:24:46 CET 2010
On Mar 08, 2010 at 22:01, I?aki Baz Castillo <ibc at aliax.net> wrote:
> El Lunes 08 Marzo 2010, I?aki Baz Castillo escribi?:
> > El Lunes 08 Marzo 2010, Juha Heinanen escribi?:
> > > Alex Balashov writes:
> > > > But when does t_relay() itself ever fail due to endpoint reachability
> > > > issues? I think t_relay() only fails for formal reasons, like host
> > > > name lookup failure, invalid address format, etc? Otherwise, it
> > > > returns success; if the endpoint is not reachable, the transaction
> > > > simply times out. If this is the case, branch route does get called.
> > >
> > > my understanding is that t_relay calls a branch route always if
> > > t_on_branch is used to set it. then in that branch route, you should be
> > > able to call set_forward_no_connect().
> >
> > I really though that t_relay() fails (return a negative code and doesn't
> > invoke a loaded branch_route) in case the TCP cannot be established. Am I
> > wrong?
>
> Yes I'm wrong. t_relay() doesn't fail (doesn't return a error) in case a TCP
> connection can not be established. If you set branch_route before it will be
> executed and ~10 seconds later (configurable) you get the TCP error:
>
> ERROR:core:tcp_blocking_connect: timeout 10 s elapsed from 10 s
> ERROR:core:tcpconn_connect: tcp_blocking_connect failed
That's because you're in tcp non-async mode (not recommended in general,
unless you have to use tls).
Andrei
More information about the sr-dev
mailing list