]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
bug #2652 and bud #2385: "tunnelReadServer: FD xx: read failure: (0) Success" error...
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 27 Apr 2009 19:19:00 +0000 (22:19 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 27 Apr 2009 19:19:00 +0000 (22:19 +0300)
-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

src/tunnel.cc

index e20ff11a2547f1be55b8d66c0421abe8d26ac1f4..a235b9248f04ffe757f0daed83c83981bfcc98f8 100644 (file)
@@ -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