[reSIProcate] Patch for rutil
Karlsson
boost.regex at gmail.com
Fri Sep 27 08:51:44 CDT 2013
Hi Daniel, in the udp.cxx, the UDP socket is works in blocking mode, the
recvfrom will always wait if no data is received, it's never return if the
STUN server is not respond or it is down.
In my patch the UDP socket is set a timeout option, and it will trying
three times once the sendto/recvfrom returned by timeout.
I'm not write the test case, it's just works fine in my project.
Best regards,
On Fri, Sep 27, 2013 at 7:49 PM, Daniel Pocock <daniel at pocock.com.au> wrote:
> On 25/09/13 04:41, Karlsson wrote:
> > I watch a bug/defect in the rutil/stun, with currently code, the
> > recvfrom function which in the udp.cxx will be block then cause the
> > application freeze if the stun server IP/domain is not live(not
> > respond). I have created a patch which is set the socket timeout to
> > 600 ms, and it will try three times if failed, just for reference.
> >
>
>
> Hi Karlsson,
>
> Did you find any test case which tests this class or do you think it
> would be very difficult to create such a test case that simulates the
> bug (e.g. by referring to an IP that is deliberately blackholed)
>
> On a more general note, some test cases like that would potentially need
> a local environment configured to simulate certain problems and may not
> be valid in CI (on travis-ci.org). We could use some environment
> variable to specify whether such test cases run or not.
>
> Regards,
>
> Daniel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20130927/5b112c3d/attachment.htm>
More information about the resiprocate-devel
mailing list