[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luasocket invalidates its internal state by closing the socket when setsockname() fails
- From: Ted Unangst <ted.unangst@...>
- Date: Fri, 19 Mar 2010 19:22:22 -0400
On Wed, Feb 24, 2010 at 6:34 PM, Sam Roberts <vieuxtech@gmail.com> wrote:
> This is purely a luasocket behaviour. The system calls allow bind() to
> fail, leaving the socket valid.
Only on some systems.
> This behaviour of luasocket is particularly anti-social when
> attempting to repeatedly bind to local ports, to search for one that
> is free.
You're supposed to create a new socket after a failed bind. Read your
Stevens. :)