libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] The resuming of a single connection and daemon not coord


From: 钱在晨(二败)
Subject: [libmicrohttpd] The resuming of a single connection and daemon not coordinate
Date: Sun, 31 May 2015 10:57:41 +0800

Hi, 


Is there any situation that in the function resume_suspended_connections(), connection->resuming and connection->suspended are MHD_YES,  but daemon->resuming is MHD_NO?


My program uses one thread to produce data and a callback function in another thread (in the threadpool of libmicrohttpd) to return the produced data. The producing-data thread need wait until new data's coming. So I use  MHD_suspend_connection in the callback function if no data to send and  MHD_resume_connection in the producing-data thread when data is ready. But the program does not work because in the end in the function  resume_suspended_connections(), the daemon->resuming is MHD_NO. In the meanwhile, there is actually a suspended connection in the daemon->suspended_connections_head. I check the status and find that the suspended connection with resuming: MHD_YES and suspended: MHD_YES, but the daemon->resuming is MHD_NO. 


I don't know if I explain the issue clearly. Is it normal or abnormal that daemon->resuming with the value MHD_NO makes a previously suspended connection cannot be resumed?


Best Regards,

Jason



reply via email to

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