On 07/08/2011 09:01 PM, Henrik Nordström wrote:
fre 2011-07-08 klockan 17:30 +0300 skrev Tsantilas Christos:

I think the fd_table[].halfClosedReader is used to check for half closed
connections, does not mean that the connections is half closed (But I
did not check it...)

A connection can not be idle if it's half-closed, and a idle connection
can not be half-closed. If the remote closes an idle connection then
it's terminated and need to be fully closed, never half-closed.

The only half-closed connections we have is when the client cloes it's
transmit channel while we are transmitting the response. There we need
some careful checking to allow the response to be sent while checking
for transmission errors. Once the pending responses have been sent the
connection MUST be closed.

On Squid<->Server connections (or ICAP) there is no half-closed
connections. The half-closed condition can only occur in connections to
clients.

There is no special handling for detecting a half-closed connection.
It's just a plain len=0 (EOF) while trying to read the response. All the
sepcial dealing takes place after that.


I see...I just examine the Half closed related code and looks that we should not get this assertion for any reason for ICAP or HTTP side connections. And we should not have half-closed connection in connections pools... Just does not make sense, it is something wrong here.

Maybe this assertion comes because of the bugs in pconn.cc (fds are not closed and reused, duplicate entries etc). But maybe still there are problems here...

I need to check it again.Thank you!


Regards
Henrik



Reply via email to