test,freebsd: fix flaky poll tests
On FreeBSD `close()` can fail with `ECONNRESET` if the socket was shutdown by the peer before all pending data was delivered. PR-URL: https://github.com/libuv/libuv/pull/1780 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
7f85924e8b
commit
9051126b56
@ -134,7 +134,10 @@ static void close_socket(uv_os_sock_t sock) {
|
|||||||
#else
|
#else
|
||||||
r = close(sock);
|
r = close(sock);
|
||||||
#endif
|
#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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user