diff --git a/src/net.c b/src/net.c index 003ff5757..b693ea7fb 100644 --- a/src/net.c +++ b/src/net.c @@ -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)