test_fail("recv() should have yielded EAGAIN");
/* This may be an implementation aspect, or even plain wrong (?). */
- if (send(client_sd, buf, sizeof(buf), 0) != -1) {
- if (!info->ignore_send_waiting) {
+ if (!info->ignore_send_waiting) {
+ if (send(client_sd, buf, sizeof(buf), 0) != -1) {
test_fail("send() should have failed");
+ } else if (errno != EAGAIN) {
+ test_fail("send() should have yielded EAGAIN");
}
- } else if (errno != EAGAIN) {
- test_fail("send() should have yielded EAGAIN");
}
switch (fork()) {