diff --git a/cloudphone/src/main/cpp/cas_socket/CasTcpSocket.cpp b/cloudphone/src/main/cpp/cas_socket/CasTcpSocket.cpp index acbf996cf3c93c44daeb0ae2e9b049081c5b2f8d..59d6c45a1dcbccc564ee969f52aa4d29f87515d2 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;