sendfile tests: Fix an error check in tcp_socketpair()

Fixes:	c368d3f20f ("tests/sendfile: factor out tcp_socketpair()")
Differential Revision:	https://reviews.freebsd.org/D45598
This commit is contained in:
Mark Johnston 2024-06-21 14:18:22 -04:00
parent 681fd2bed8
commit ac52fa1f1b

View File

@ -84,7 +84,7 @@ tcp_socketpair(int *sv)
if (fcntl(sv[0], F_SETFL, flags) == -1)
err(1, "fcntl +O_NONBLOCK");
if (connect(sv[0], (void *)&sin, sizeof(sin)) != -1 ||
if (connect(sv[0], (void *)&sin, sizeof(sin)) == -1 &&
errno != EINPROGRESS)
err(1, "connect cs");