Skip to content

Commit

Permalink
Merge pull request #1379 from davidBar-On/UDP-NET_SOFTERROR-debug-mes…
Browse files Browse the repository at this point in the history
…sage

NET_SOFTERROR on UDP send EAGAIN/EINTR errno if no data was sent
  • Loading branch information
swlars authored Dec 6, 2024
2 parents 510cf65 + 4511c3b commit d595ee6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,14 @@ Nwrite(int fd, const char *buf, size_t count, int prot)
/* XXX EWOULDBLOCK can't happen without non-blocking sockets */
case EWOULDBLOCK:
#endif
if (count == nleft)
return NET_SOFTERROR;
return count - nleft;

case ENOBUFS:
return NET_SOFTERROR;
case ENOBUFS :
return NET_SOFTERROR;

default:
default:
return NET_HARDERROR;
}
} else if (r == 0)
Expand Down

0 comments on commit d595ee6

Please sign in to comment.