ext/libuv/test/test-poll.c in libuv-4.0.0 vs ext/libuv/test/test-poll.c in libuv-4.0.1
- old
+ new
@@ -132,10 +132,13 @@
#ifdef _WIN32
r = closesocket(sock);
#else
r = close(sock);
#endif
- ASSERT(r == 0);
+ /* On FreeBSD close() can fail with ECONNRESET if the socket was shutdown by
+ * the peer before all pending data was delivered.
+ */
+ ASSERT(r == 0 || errno == ECONNRESET);
}
static connection_context_t* create_connection_context(
uv_os_sock_t sock, int is_server_connection) {