From: Amos Jeffries Date: Sun, 3 May 2009 11:49:37 +0000 (+1200) Subject: Author: Christos Tsantilas X-Git-Tag: SQUID_3_1_0_8~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1daf4a2d9770ef40970b32ffeaadf6d5336d2bbe;p=thirdparty%2Fsquid.git Author: Christos Tsantilas Bug 2652 and Bug 2385: tunnelReadServer: read failure: (0) Success error message -Method TunnelStateData::Connection::error: The xerrno is the errno values (EAGAIN, EINTR etc) not a COMM_XX error/flag. - Methods TunnelStateData::writeServerDone,TunnelStateData::writeClientDone: if the related connection fd closing (flag==COMM_ERR_CLOSING) just return --- diff --git a/src/tunnel.cc b/src/tunnel.cc index e20ff11a25..a235b9248f 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -260,9 +260,6 @@ TunnelStateData::Connection::error(int const xerrno) /* XXX fixme xstrerror and xerrno... */ errno = xerrno; - if (xerrno == COMM_ERR_CLOSING) - return; - debugs(50, debugLevelForError(xerrno), "TunnelStateData::Connection::error: FD " << fd() << ": read/write failure: " << xstrerror()); @@ -345,6 +342,9 @@ TunnelStateData::writeServerDone(char *buf, size_t len, comm_err_t flag, int xer { debugs(26, 3, "tunnelWriteServer: FD " << server.fd() << ", " << len << " bytes written"); + if(flag == COMM_ERR_CLOSING) + return; + /* Error? */ if (len < 0 || flag != COMM_OK) { server.error(xerrno); // may call comm_close @@ -403,6 +403,9 @@ TunnelStateData::writeClientDone(char *buf, size_t len, comm_err_t flag, int xer { debugs(26, 3, "tunnelWriteClient: FD " << client.fd() << ", " << len << " bytes written"); + if(flag == COMM_ERR_CLOSING) + return; + /* Error? */ if (len < 0 || flag != COMM_OK) { client.error(xerrno); // may call comm_close