From 3401729cba58fcd292f995986c0b9b1aa8ec7557 Mon Sep 17 00:00:00 2001 From: wangshuo <584363327@qq.com> Date: Thu, 21 Sep 2023 11:50:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E7=AB=AFsocket=E4=B8=BB=E5=8A=A8?= =?UTF-8?q?=E6=96=AD=E5=BC=80=E6=97=B6=EF=BC=8C=E8=BF=94=E5=9B=9E=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=AD=A3=E5=9C=A8=E4=BD=BF=E7=94=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudphone/src/main/cpp/cas_socket/CasTcpSocket.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudphone/src/main/cpp/cas_socket/CasTcpSocket.cpp b/cloudphone/src/main/cpp/cas_socket/CasTcpSocket.cpp index acbf996..59d6c45 100644 --- a/cloudphone/src/main/cpp/cas_socket/CasTcpSocket.cpp +++ b/cloudphone/src/main/cpp/cas_socket/CasTcpSocket.cpp @@ -196,7 +196,7 @@ int CasTcpSocket::ConfigSSL() } int ret = SSL_connect(m_ssl); if (ret != 1) { - ERR("Connect failed %s %d", ERR_reason_error_string(ERR_get_error()), ret); + ERR("Connect failed %s , ret = %d, errno = %d", ERR_reason_error_string(ERR_get_error()), ret, errno); int status = SSL_get_error(m_ssl, ret); SSL_CTX_free(m_ctx); SSL_free(m_ssl); @@ -204,7 +204,7 @@ int CasTcpSocket::ConfigSSL() m_ctx = nullptr; m_ssl = nullptr; m_fd = -1; - if (status == SSL_ERROR_SYSCALL && errno == 0) { + if (status == SSL_ERROR_SYSCALL && (errno == 0 || errno == ECONNRESET)) { return SSL_CONFIG_SOCKET_CLOSE; } else { return SSL_CONFIG_ERROR; -- Gitee