Thanks for response, sorry I took so long to reply I have been ill.

Here is simple test that causes the issue on windows (disable all network adaptors on windows before running, so there are no DNS servers):

use AnyEvent; use AnyEvent::HTTP; my $cv = AnyEvent->condvar; my $timer = AnyEvent->timer(after=>1,interval=>1,cb=>sub{ print STDOUT + "."; flush STDOUT; }); my $sig = AnyEvent->signal (signal => "INT", cb => sub { $cv->send; }) +; http_get "http://www.google.com/", sub { print "Get completed (".$_[1]->{Status}.")"; $cv->send; }; $cv->recv;

I have figured out the call chain, but I am unable to determine what to do about it. It seems like Resolver is trying to send a udp packet to a blank IP address?

Anyevent::DNS is doing this:

my $r = Net::DNS::Resolver->new;

Net::DNS::Resolver::MSWin32 in its _init is calling:

$defaults->nameservers(@nameservers);

nameservers() is in Net::DNS::Resolver::Base which calls send() and _send_udp()

_send_udp is then calling can_read from IO::Select

This results in a blocking call at this line with the timeout being several minutes:

defined($r) && (select($r,undef,undef,$timeout) > 0)

I cannot figure out what resolver is trying to do here or who it is even trying to send to. Any help would be great! Thanks


In reply to Re^2: Windows: AnyEvent -> HTTP -> DNS - > Blocking for minutes by sectokia
in thread Windows: AnyEvent -> HTTP -> DNS - > Blocking for minutes by sectokia

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.