Do not log errors when recvfrom() returns EAGAIN or EINTR.
Although we select() before we call recvfrom(), it sometimes happens that select() tells us we can read but a subsequent read fails anyway. This is harmless.
This commit is contained in:
parent
df4add94a4
commit
66be914d35
1 changed files with 2 additions and 1 deletions
|
@ -552,7 +552,8 @@ void handle_incoming_vpn_data(int sock)
|
||||||
pkt.len = recvfrom(sock, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen);
|
pkt.len = recvfrom(sock, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen);
|
||||||
|
|
||||||
if(pkt.len < 0) {
|
if(pkt.len < 0) {
|
||||||
logger(LOG_ERR, _("Receiving packet failed: %s"), strerror(errno));
|
if(errno != EAGAIN && errno != EINTR)
|
||||||
|
logger(LOG_ERR, _("Receiving packet failed: %s"), strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue