lua-users home
lua-l archive

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


In my case, the server should never block as it is handling multiple 
connections, so I am looking for a workaround that will keep communication 
"normal" on the other connected sockets.

If ignoring the error simply makes it trigger again the next time around the 
select loop, the server will certainly become very busy with a few of these 
hanging around, so I was hoping that either the bug "rarely" happens or 
another kind of workaround that minimize the severity of this kind of bug.

I guess this bug would make it hard to create single threaded socket servers 
on Windows (at least using the select call).

Regards,

Marius Kjeldahl

On Tuesday 21 September 2004 20:01, Diego Nehab wrote:
> Hi,
>
> > Important note: a known bug in WinSock causes select to fail on
> > non-blocking TCP sockets. The function may return a socket as writable
> > even though the socket is not ready for sending.
> >
> > Does anybody know if there is a workaround for this bug? For instance,
> > would it be possible to disregard the possible "write error" after trying
> > to write to a non-blocking socket that was falsely woken up "ready for
> > sending" due to this bug?
>
> This is what I do internally. Is it not? It becomes a busy wait.
> How is this bug showing up for you?
>
> []s,
> Diego.