test: allow UV_ECONNRESET in tcp_try_write_error

Recent CI failures imply that uv_try_write() can return
UV_ECONNRESET - specifically on FreeBSD. This commit
updates the test to pass when that error code is returned.

PR-URL: https://github.com/libuv/libuv/pull/2355
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
cjihrig 2019-06-27 13:27:34 -04:00
parent 1a06462cd3
commit f66db9c5c5
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -48,7 +48,7 @@ static void incoming_close_cb(uv_handle_t* handle) {
while (r > 0)
r = uv_try_write((uv_stream_t*) &client, &buf, 1);
fprintf(stderr, "uv_try_write error: %d %s\n", r, uv_strerror(r));
ASSERT(r == UV_EPIPE || r == UV_ECONNABORTED);
ASSERT(r == UV_EPIPE || r == UV_ECONNABORTED || r == UV_ECONNRESET);
ASSERT(client.write_queue_size == 0);
}