summaryrefslogtreecommitdiff
path: root/source3/lib/util_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_sock.c')
-rw-r--r--source3/lib/util_sock.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index de90b29294..1a73a310b6 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -278,7 +278,12 @@ ssize_t read_udp_socket(int fd,char *buf,size_t len)
memset((char *)&lastip,'\0',sizeof(lastip));
ret = (ssize_t)sys_recvfrom(fd,buf,len,0,(struct sockaddr *)&sock,&socklen);
if (ret <= 0) {
- DEBUG(2,("read socket failed. ERRNO=%s\n",strerror(errno)));
+ /* Don't print a low debug error for a non-blocking socket. */
+ if (errno == EAGAIN) {
+ DEBUG(10,("read socket returned EAGAIN. ERRNO=%s\n",strerror(errno)));
+ } else {
+ DEBUG(2,("read socket failed. ERRNO=%s\n",strerror(errno)));
+ }
return(0);
}