On 03/18/2011 05:20 PM, Amos Jeffries wrote:
> On 19/03/11 05:41, Alex Rousskov wrote:
>> Why do we need to set HTTP_OK twice?
> 
> There are two paths, one when connecting DIRECT:
>   (tunnelConnectDone -> tunnelConnected -> tunnelConnectedWriteDone)
>  and one when relaying to a cache_peer
>  (tunnelConnectDone -> tunnelProxyConnected ->
> tunnelProxyConnectedWriteDone -> tunnelConnectedWriteDone)

My bad. I must have grepped for the wrong tunnelWhateverWriteDone :-(.

> We could perhapse set HTTP_OK in tunnelConnectDone before deciding which
> to take. Then update it again in tunnelProxyConnectedWriteDone on write
> failure.
>  I kind of think setting it like this after the connect has actually
> been done is better. But either way is doable.

Yes, once is better.

Thank you,

Alex.

Reply via email to