libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] Problem destroying response objects


From: Jon Nalley
Subject: [libmicrohttpd] Problem destroying response objects
Date: Fri, 13 Mar 2009 13:40:49 -0500

Hi,

I am using libmicrohttpd to handle "Comet/Ajax long poll requests".  My
client establishes a connection to libmicrohttpd and a response object
is created using MHD_create_response_from_callback().  The response
callback returns zero bytes until data is available for the client.
At that time, the callback answers the request.  This allows the
client to receive data only when the server has something to send.
The problem that I am observing is that the response object doesn't
seem to be destroyed when a client disconnects.  The response object
is repeatedly invoked (during every MHD_run()) whether the client is
connected or not.  The response object is freed if the callback
returns -1 or more than zero bytes, and a "Broken pipe" error is
reported.  It seems that some notification needs to occur when a
client disconnects to destroy outstanding response objects associated
with the connection.  Any ideas on how I might accomplish this?

Regards,

Jon Nalley


reply via email to

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