Hi Matt,

I admit I do not have much experience with this code, but I think this can
> be corrected by replacing the following in handler_process_request in
> src/handler.c
>
> Connection_deliver_raw(conn, NULL);
>
> with:
>
> Connection_deliver_enqueue(conn, NULL, NULL)
>

Not sure where you're checking but Connection_deliver_enqueue fn takes only
two parameters:
https://github.com/zedshaw/mongrel2/blob/v1.8.0/src/connection.c#L86

How are you testing the keep-alive connections?

curl -I -v http://mongrel.host
Should display something about keeping connection around if keep alive is
requested or closing it otherwise

.a





On 31 December 2012 19:33, Matthew Hawn
<[email protected]<javascript:_e({}, 'cvml',
'[email protected]');>
> wrote:

> I am working an a python handler for mongrel2 and have run into a problem.
> It seems that Mongrel2 is not closing connections when sent an empty
> message.  From what I can tell, handler_process_request used to call
> Request_disconnect. This was apparently moved so that the connection
> wasn't closed while there still was data in the queue.  Unfortunately, the
> dequeue side doesn't seem to catch the sentinel of a NULL string and in
> fact raises a spurious error.
>
> I admit I do not have much experience with this code, but I think this can
> be corrected by replacing the following in handler_process_request in
> src/handler.c
>
> Connection_deliver_raw(conn, NULL);
>
> with:
>
> Connection_deliver_enqueue(conn, NULL, NULL)
>

https://github.com/zedshaw/mongrel2/blob/v1.8.0/src/connection.c#L86


>
>
> Also, it would be nice if the fix for this can be incorporated into the
> 1.8 release as a hotfix since this severely affects my handler, and other
> handlers as well.
>
>
> Matt Hawn
>
>

Reply via email to