Hi Santos, I'm not sure what you mean by MHD returning "EAGAIN" (that's usually what the operating system returns to the application, MHD doesn't itself return that style of error codes to applications). That said, when MHD gets an EAGAIN from the OS, it should retry (unless the application for some reason tells it not to, i.e. from timeout or because the application returns "MHD_NO" in the main callback).
As to why EAGAIN happens, there can be a number of causes, from MHD being 'optimistic' (using non-blocking sockets) and reading/writing in the absence of a prior select/poll/epoll notification, to this actually being the required normal behavior for using epoll() with edge triggers. Regardless, getting EAGAIN itself is *not* an error, just a particular result from a system call. Only if MHD then fails to retry at a later time there might be a bug (in MHD or the application using it). I hope this helps! Happy hacking! Christian On 12/17/18 1:21 PM, Santos Das wrote: > Hi, > > We are using Suspend and Resume, and we see that libmicrohttpd returns > EAGAIN while sending the response to the client. > > Any idea why does this happen ? Is it because the client is not reading > from the socket ? > > What does MHD do in this case ? Does it close the connection on this error ? > > I saw some previous discusion here. But, I was not clear. > > https://lists.gnu.org/archive/html/libmicrohttpd/2014-11/msg00001.html > > Any information on this would be appreciated. > > > Thanks, Santos
signature.asc
Description: OpenPGP digital signature
