libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] Resume event blocking


From: 김현호
Subject: [libmicrohttpd] Resume event blocking
Date: Tue, 2 Feb 2016 16:22:56 +0900

Hello,

 

I am using MHD 0.9.48 version are working to create a cache server.

I saw recently with the SUSPEND_RESUME for asynchronous processing if multiple connection at the same time to resume the write times of the pipe caused by an event occurs once and only once read in the rest of the pipe remains in the pipe queue.

If you look up several times repeated in this way all the pipe fills up, it will not write anymore that block the phenomenon generated in the resume.

 

Following the above problem it did not occur anymore after such modifications.

 

diff -r libmicrohttpd-0.9.48/src/include/platform_interface.h my_0.9.48/src/include/platform_interface.h

163c163

< #define MHD_pipe_(fdarr) pipe((fdarr))

---

> #define MHD_pipe_(fdarr) pipe2((fdarr), O_NONBLOCK)

 

diff -r libmicrohttpd-0.9.48/src/microhttpd/daemon.c my_0.9.48/src/microhttpd/daemon.c

2832c2832

<               (void) MHD_pipe_read_ (daemon->wpipe[0], &tmp, sizeof (tmp));

---

>                 while (MHD_pipe_read_ (daemon->wpipe[0], &tmp, sizeof (tmp)) > 0) ;

 

 

Best Regards

Hyunho Kim

 


reply via email to

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