lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Sun, Jul 27, 2014 at 3:55 PM, Paul K <> wrote:
> It works well for me on Windows, but still blocks on requests for
> non-existing addresses.

That's because connect() includes a DNS lookup, and DNS resolution on
Windows is synchronous. Most programs work around this problem using
threads. It's kinda lame.

> The current logic also doesn't work when http.TIMEOUT is set to 0
> instead of a small non-zero value. The result is still sufficiently
> good for me, but I'd be interested to know how to make it work for 0
> timeout as well.

What's the expected behavior of a zero timeout? I would expect it to
never succeed at all, because no packet ever has zero latency.

/s/ Adam