- Fix to silence the tls handshake errors for broken pipe and reset

by peer, unless verbosity is set to 2 or higher.
This commit is contained in:
W.C.A. Wijngaards 2020-01-28 14:32:06 +01:00
parent a930b94658
commit 6c0a863584
2 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,8 @@
28 January 2020: Wouter
- iana portlist updated.
- Fix to silence the tls handshake errors for broken pipe and reset
by peer, unless verbosity is set to 2 or higher.
27 January 2020: Ralph
- Merge PR#154; Allow use of libbsd functions with configure option

View File

@ -1120,6 +1120,14 @@ ssl_handshake(struct comm_point* c)
return 0; /* closed */
} else if(want == SSL_ERROR_SYSCALL) {
/* SYSCALL and errno==0 means closed uncleanly */
#ifdef EPIPE
if(errno == EPIPE && verbosity < 2)
return 0; /* silence 'broken pipe' */
#endif
#ifdef ECONNRESET
if(errno == ECONNRESET && verbosity < 2)
return 0; /* silence reset by peer */
#endif
if(errno != 0)
log_err("SSL_handshake syscall: %s",
strerror(errno));