libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] hung up sockets cause endless loop


From: Pawel Veselov
Subject: [libmicrohttpd] hung up sockets cause endless loop
Date: Mon, 23 Jun 2014 21:05:26 -0700

Hi.

I have this problem with my handler being called endlessly if the socket was closed in some (I guess), unfriendly way on the remote side.

My logic, in general, is to always set *upload_data_size to 0, and return MHD_YES. In this case, I see myself being called over and over again. There are at least 3 active context (I print its %p)

The strace shows this in the loop (the write is the output from my handler, *upload_data_size is always 0 at the time of the callback)

907   poll([{fd=5, events=POLLIN}, {fd=16, events=0}, {fd=15, events=0}, {fd=14, events=0}], 4, 4294967295) = 1 ([{fd=15, revents=POLLERR|POLLHUP}])
907   write(2, "HTTP POST /r/0/0, 0 bytes, (nil)"..., 52) = 52
907   write(2, "Skipping input chunk 0, because "..., 58) = 58
907   write(2, "HTTP POST /r/0/0, 0 bytes, (nil)"..., 52) = 52
907   write(2, "Skipping input chunk 0, because "..., 58) = 58
907   write(2, "HTTP POST /r/0/0, 0 bytes, (nil)"..., 52) = 52
907   write(2, "Skipping input chunk 0, because "..., 58) = 58

Am I missing checking on some property, and returning MHD_NO as a result?

Thank you,
  Pawel.


reply via email to

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