Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-33068 Securesocket handle error add errno to log message #19333

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions system/security/securesocket/securesocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,7 @@ void CSecureSocket::handleError(int ssl_err, bool writing, bool wait, unsigned t
{
// if !wait, then we only perform ssl_err checking, we do not wait_read/wait_write or timeout
int rc = 0;
int sockErr = 0;
switch (ssl_err)
{
case SSL_ERROR_ZERO_RETURN:
Expand All @@ -791,7 +792,7 @@ void CSecureSocket::handleError(int ssl_err, bool writing, bool wait, unsigned t
}
case SSL_ERROR_SYSCALL:
{
int sockErr = SOCKETERRNO();
sockErr = SOCKETERRNO();
if (sockErr == EAGAIN || sockErr == EWOULDBLOCK)
{
if (wait)
Expand All @@ -810,7 +811,7 @@ void CSecureSocket::handleError(int ssl_err, bool writing, bool wait, unsigned t
char errbuf[512];
ERR_error_string_n(ssl_err, errbuf, 512);
ERR_clear_error();
VStringBuffer errmsg("%s error %d - %s", opStr, ssl_err, errbuf);
VStringBuffer errmsg("%s error %d (%d) - %s", opStr, ssl_err, sockErr, errbuf);
if (m_loglevel >= SSLogMax)
DBGLOG("Warning: %s", errmsg.str());
THROWJSOCKEXCEPTION_MSG(ssl_err, errmsg);
Expand Down
Loading