- silence 'tcp connect: broken pipe' at low verbosity.

git-svn-id: file:///svn/unbound/trunk@2341 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2010-11-15 13:15:23 +00:00
parent 6976832ffe
commit c9dbc9907a
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,6 @@
15 November 2010: Wouter
- silence 'tcp connect: broken pipe' at low verbosity.
9 November 2010: Wouter
- unbound-anchor compiles with openssl 0.9.7.

View file

@ -895,6 +895,10 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
#ifdef ETIMEDOUT
else if(error == ETIMEDOUT && verbosity < 2)
return 0; /* silence 'connection timed out' */
#endif
#ifdef EPIPE
else if(error == EPIPE && verbosity < 2)
return 0; /* silence 'broken pipe' */
#endif
else if(error != 0) {
log_err("tcp connect: %s", strerror(error));
@ -933,6 +937,10 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
#endif /* HAVE_WRITEV */
if(r == -1) {
#ifndef USE_WINSOCK
#ifdef EPIPE
if(errno == EPIPE && verbosity < 2)
return 0; /* silence 'broken pipe' */
#endif
if(errno == EINTR || errno == EAGAIN)
return 1;
log_err("tcp writev: %s", strerror(errno));