Socket timeout not working with libUrl
alex at tweedly.net
Mon Jan 31 05:41:38 EST 2005
Frank Leahy wrote:
> After a lot of testing on Mac OS X, I've found that the problem I was
> having appears to be due to the way that Mac OS X does DNS lookups.
> Whether or not it's a RunRev bug as well is hard to tell, but I think
> it might be.
> Here's some sample code I wrote. This code sends a "My5SecondTimeout"
> message to itself, opens a socket, makes an HTTP GET request, waits
> for the response, and closes the socket. (Note: I had to use this
> "My5SecondTimeout" message because setting the socketTimeoutInterval
> doesn't seem to work).
> When you run this script and you're not connected to the internet
> here's what happens:
> 1) If I open the socket with an ip address, e.g. 188.8.131.52, my
> 5 second timer will fire, and I can close the socket and exit from the
> 2) If I open the socket with a domain address, e.g.
> www.webphotospro.com, Mac OS X does a DNS lookup, puts up the rainbow
> rotating color cursor, and hangs until the DNS lookup fails. On my
> machine this takes 60 seconds (apparently it's dependent on how many
> dns servers you have listed).
> I'm guessing this is a RunRev bug, but I can't be sure. Basically
> RunRev hangs for 60 seconds while the DNS lookup takes place during
> the "open socket" call -- it doesn't send a socket timeout, and it
> doesn't the "My5SecondTimeout" message either.
> Can confirm this?
you may have missed the email I sent earlier in this thread, re bug 2117
Engine blocks on DNS query
Take a look at that bug report for more details. You can check for
dnsservers - which will prevent the problem occurring in most cases, but
there are still some cases where it will fail.
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.6 - Release Date: 27/01/2005
More information about the Use-livecode