Commit 5bb9d9b0 authored by Niels Möller's avatar Niels Möller

tcpconnect: Ignore ECONNRESET from shutdown.

parent 8a0cc32f
2014-10-06 Niels Möller <nisse@lysator.liu.se>
* src/testsuite/tcpconnect.c (main): Ignore ECONNRESET failure of
shutdown (happens on BSD).
2014-10-02 Niels Möller <nisse@lysator.liu.se> 2014-10-02 Niels Möller <nisse@lysator.liu.se>
* src/client_x11.c (do_client_channel_x11_receive): Changed a * src/client_x11.c (do_client_channel_x11_receive): Changed a
......
...@@ -307,7 +307,10 @@ main (int argc, char **argv) ...@@ -307,7 +307,10 @@ main (int argc, char **argv)
wait_stdin_eof = 0; wait_stdin_eof = 0;
if (!wait_remote_eof) if (!wait_remote_eof)
break; break;
if (shutdown (fd, SHUT_WR) < 0 && errno != ENOTCONN) /* If the server has closed the connection already, we
get ENOTCONN on Linux, and ECONNRESET on BSD. */
if (shutdown (fd, SHUT_WR) < 0
&& errno != ENOTCONN && errno != ECONNRESET)
die("shutdown failed: %s\n", strerror(errno)); die("shutdown failed: %s\n", strerror(errno));
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment