Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 126 | Blame | Compare with Previous | Last modification | View Log | RSS feed

Description: In testsuite/tcpconnect, treat ECONNRESET as a correct connection shutdown.
 Seems to be necessary on BSD kernels.

diff --git a/src/testsuite/tcpconnect.c b/src/testsuite/tcpconnect.c
index 73398ae..c7dfa02 100644
--- a/src/testsuite/tcpconnect.c
+++ b/src/testsuite/tcpconnect.c
@@ -307,7 +307,8 @@ main (int argc, char **argv)
              wait_stdin_eof = 0;
              if (!wait_remote_eof)
                break;
-             if (shutdown (fd, SHUT_WR) < 0 && errno != ENOTCONN)
+             if (shutdown (fd, SHUT_WR) < 0
+                 && errno != ENOTCONN && errno != ECONNRESET)
                die("shutdown failed: %s\n", strerror(errno));
            }
          else