From: Christos Tsantilas Date: Mon, 27 Apr 2009 19:19:00 +0000 (+0300) Subject: bug #2652 and bud #2385: "tunnelReadServer: FD xx: read failure: (0) Success" error... X-Git-Tag: SQUID_3_2_0_1~1034 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a62c5424b53a3215268830b972ea2fb54898d4c;p=thirdparty%2Fsquid.git bug #2652 and bud #2385: "tunnelReadServer: FD xx: 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