libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] winsock & EPOLL_TURBO


From: Christian Grothoff
Subject: Re: [libmicrohttpd] winsock & EPOLL_TURBO
Date: Sat, 10 Aug 2013 17:54:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130704 Icedove/17.0.7

On 08/10/13 17:50, LRN wrote:
I've made a patch that fixes the problem, no need to disable shutdown()
completely. Here it is.

The problem is that winsock freaks out (and prevents you from sending
the reply) if you shutdown with SD_RECEIVE while there is data in recv
buffer.

Sorry, couldn't send the patch sooner - had to reproduce the problem in
a testcase, then test the patch in MHD.

I'm not sure that patch _always_ works. There is a natural race condition in that code, as more data can always be received just between your recvfrom call and the shutdown call.

So I think I prefer my method, especially as not doing the shutdown is
still technically correct behavior as far as I see it.

Happy hacking!

Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]