Re: [PATCH] Bug 3420: Request body consumption races and !theConsumer

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Tue, 29 Nov 2011 10:30:01 -0700

On 11/18/2011 03:52 PM, Amos Jeffries wrote:
>>> The edge case is likely to be
>>> ClientSocketContext::keepaliveNextRequest() where pinning closes the
>>> conn. That is one error case and could potentially lead to problems. I
>>> suspect that it should be doing stopSending("pinned server gone") before
>>> it does comm_close(). Do you agree?

>> I am afraid no. There is no point in calling stopSending (or
>> stopReceiving) before calling comm_close() because comm_close() will
>> kill the connection and we would have to stop sending and receiving.

> I was thinking more along the lines of passing the reason for closure.
> Its not causing any bad behaviour that I can see.

I agree that closing reason is often valuable, but I do not think we
should abuse stopSending() that way. We can add the closing reason to
fd_table (passed via an optional comm_close parameter), reuse fd_note
API to record/store it, or add a third ConnStateData data member.

Recording connection closing reason would be outside this fix scope though.

Thank you,

Alex.
Received on Tue Nov 29 2011 - 17:30:35 MST

This archive was generated by hypermail 2.2.0 : Wed Nov 30 2011 - 12:00:07 MST