[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:18:17 -0400
On Fri, Mar 19, 2010 at 1:06 PM, Diego Nehab <diego@tecgraf.puc-rio.br> wrote:
> I think it is safe. The reason it is there is because I had
> read somewhere that once a call to bind fails, you shouldn't
> use the socket again. I have been unable to find a reference
> for this again, so I have to assume I was dreaming. :/
This is how sockets work on BSD derived systems. If you change
luasocket, then lua programs relying on the socket staying alive after
a failed bind will no longer portable.