From: Guus Sliepen Date: Thu, 11 Jun 2009 17:26:34 +0000 (+0200) Subject: Do not log errors when recvfrom() returns EAGAIN or EINTR. X-Git-Tag: import-tinc-1.1~592^2~28 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=66be914d35cb7e7ea4dd4aed68ae9e41addd9f70;p=meshlink 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. --- diff --git a/src/net_packet.c b/src/net_packet.c index 9f612751..5e503f58 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -552,7 +552,8 @@ void handle_incoming_vpn_data(int sock) pkt.len = recvfrom(sock, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen); 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; }