Merge branch 'issue3587'

This commit is contained in:
Rainer Gerhards 2019-04-05 09:58:16 +02:00
commit 932039da61
No known key found for this signature in database
GPG Key ID: 0CB6B2A8BE80B499
2 changed files with 4 additions and 2 deletions

View File

@ -207,8 +207,10 @@ void osslLastSSLErrorMsg(int ret, SSL *ssl, int severity, const char* pszCallSou
if(iSSLErr == SSL_ERROR_SSL) {
LogMsg(0, RS_RET_NO_ERRCODE, severity, "SSL_ERROR_SSL in '%s'", pszCallSource);
} else if(iSSLErr == SSL_ERROR_SYSCALL){
/* SSL doc says: For socket I/O on Unix systems, consult errno for details, so it
* is save to use errno in this case */
LogMsg(errno, RS_RET_NO_ERRCODE, severity, "SSL_ERROR_SYSCALL in '%s'", pszCallSource);
LogMsg(0, RS_RET_NO_ERRCODE, severity, "SSL_ERROR_SYSCALL in '%s'", pszCallSource);
} else {
LogMsg(0, RS_RET_NO_ERRCODE, severity, "SSL_ERROR_UNKNOWN in '%s', SSL_get_error: '%s(%d)'",
pszCallSource, ERR_error_string(iSSLErr, NULL), iSSLErr);

View File

@ -902,7 +902,7 @@ CheckConnection(nsd_t *pNsd)
rc = recv(pThis->sock, msgbuf, 1, MSG_DONTWAIT | MSG_PEEK);
if(rc == 0 && errno != EAGAIN) {
dbgprintf("CheckConnection detected broken connection - closing it\n");
dbgprintf("CheckConnection detected broken connection - closing it (rc %d, errno %d)\n", rc, errno);
/* in this case, the remote peer had shut down the connection and we
* need to close our side, too.
*/