[Top][All Lists]

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

Re: [libmicrohttpd] threading model question

From: Christian Grothoff
Subject: Re: [libmicrohttpd] threading model question
Date: Sat, 29 Oct 2011 17:58:04 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20111004 Icedove/3.0.11

It's not a race (no threads=> no races!), I had forgotten to initialize the size of the response. I've added a global flag for "terminate after one round" as well now.


On 10/29/2011 04:16 PM, Sven Geggus wrote:
Christian Grothoff schrieb am Samstag, den 29. Oktober um 15:28 Uhr:

I've attached a completed example that writes every 4s a "Round %d"
string to the client (based on the trigger).  I've added comments
where appropriate.

Thank you very much!

There seems to be a race condition somewhere:

While testing my "wget -O - -q http://localhost:8888/"; call sometimes just 
an empty document:

HTTP/1.0 200 OK..Content-Length: 0..Date: Sat, 29 Oct 2011 14:12:32 GMT....

Besides what would I need to modify in the code to close the client
socket right after one round has been sent to the client?



Attachment: fileserver_example_external_select.c
Description: Text Data

reply via email to

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