one last errno to fix!
This commit is contained in:
parent
b883f14b02
commit
2cac514b41
3
main.c
3
main.c
|
@ -97,7 +97,7 @@ void pump(struct sockaddr_in * const restrict addr, const si sock)
|
|||
errno = 0;
|
||||
const ssize_t len = recv(client_sock, buf, BUFSIZE, 0);
|
||||
|
||||
if (errno || len == -1)
|
||||
if (len == -1)
|
||||
{
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||
{
|
||||
|
@ -107,6 +107,7 @@ void pump(struct sockaddr_in * const restrict addr, const si sock)
|
|||
{
|
||||
o("%s > recv error: %d (%s)\n", datetime(dtbuf), errno, ip);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
else if (!len)
|
||||
|
|
Loading…
Reference in New Issue