From 66be914d35cb7e7ea4dd4aed68ae9e41addd9f70 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 11 Jun 2009 19:26:34 +0200 Subject: [PATCH] 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. --- src/net_packet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.20.1