Re: [cgi-devel] Issue with request data and threads
Status: Beta
Brought to you by:
drrngrvy
From: Darren G. <dar...@gm...> - 2010-08-18 23:45:02
|
Hi Ankur, On 17 August 2010 21:11, Ankur Gupta <ank...@gm...> wrote: > > I have encountered another issue. Here is the description: > > Thread gets a request, processes it but gets an EPIPE while committing the > response. The thread could return but instead it continues on to do another > accept. At this point, the accept fails with an already open message and > the thread exits. > > How should this case be handled? > This is an interesting issue, one that could be dealt with in a couple of ways. First off, if the response cannot be written back to the server, the error should be raised by the library in the response::send() call. Are you catching this or is no error being raised? I don't see why the library couldn't handle this by accepting a new request when the request is in an error state. Just note that in general you are responsible for closing a request, either by calling commit() or request::close(). Thanks for the report. Cheers, Darren |