aboutsummaryrefslogtreecommitdiff
path: root/test/test-tcp-bind-error.c
diff options
context:
space:
mode:
authorSantiago Gimeno <santiago.gimeno@gmail.com>2019-04-28 12:55:03 +0200
committerSantiago Gimeno <santiago.gimeno@gmail.com>2019-08-19 23:41:15 +0200
commit958e85fbd842be06da8484305996f42149ba5039 (patch)
tree6e77368a5cc67cc9b80927b6afdf58f0be350374 /test/test-tcp-bind-error.c
parent040543eebf4983b1459a1e0e0e26dae68b80cc28 (diff)
downloadlibuv-958e85fbd842be06da8484305996f42149ba5039.tar.gz
libuv-958e85fbd842be06da8484305996f42149ba5039.zip
tcp: add uv_tcp_close_reset method
It resets a TCP connection by sending a RST packet. Due to some platform inconsistencies, mixing of `uv_shutdown` and `uv_tcp_close_reset` calls is not allowed. Fixes: https://github.com/libuv/libuv/issues/1991 PR-URL: https://github.com/libuv/libuv/pull/2425 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/test-tcp-bind-error.c')
-rw-r--r--test/test-tcp-bind-error.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/test/test-tcp-bind-error.c b/test/test-tcp-bind-error.c
index 1456d081..f95efd9f 100644
--- a/test/test-tcp-bind-error.c
+++ b/test/test-tcp-bind-error.c
@@ -239,11 +239,7 @@ TEST_IMPL(tcp_bind_writable_flags) {
r = uv_write(&write_req, (uv_stream_t*) &server, &buf, 1, NULL);
ASSERT(r == UV_EPIPE);
r = uv_shutdown(&shutdown_req, (uv_stream_t*) &server, NULL);
-#ifdef _WIN32
- ASSERT(r == UV_EPIPE);
-#else
ASSERT(r == UV_ENOTCONN);
-#endif
r = uv_read_start((uv_stream_t*) &server, NULL, NULL);
ASSERT(r == UV_ENOTCONN);