libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] Cleanup callback isn't called


From: Erik Slagter
Subject: [libmicrohttpd] Cleanup callback isn't called
Date: Tue, 31 Aug 2010 10:04:49 +0200

Hi,

I am using the MHD_create_response_from_callback function with a "data"
callback and a "cleanup" callback.

The "data" callback gets called as expected, but the "cleanup" doesn't.

The context is as follows: the thread passes data on that another thread
generates, so it doesn't know the length in advance. This is done using
pipes (well actually socketpair, for various reasons).

The data callback is called, the available data from the pipe is given
to mhd, it even finds its way to wget. that's no problem. The problem
comes when wget is interrupted (^C) or browers window is "stopped" etc.
MHD says "Failed to send data: Broken pipe" on stderr and also the call
to send (actually sendto) returns EPIPE. which is exactly what I'd
expect. Next, I'd expect the "cleanup" callback function to be called,
so I can closed my pipe fd, as to signal the producer thread to stop
inserting data into the pipe. But this doesn't happen :-(

I am using libmhd on fedora 12 (libmicrohttpd-0.4.2-2.fc12.x86_64).

Thanks.

P.S. I am subscribed to the list!




reply via email to

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