From c3f23f4c23a89b353fad7722d10d565d291be81e Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 6 Nov 2020 19:42:22 +0800 Subject: [PATCH] For #1657, fix the http read bug --- trunk/src/app/srs_app_conn.cpp | 5 ++++- trunk/src/core/srs_core_version4.hpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/trunk/src/app/srs_app_conn.cpp b/trunk/src/app/srs_app_conn.cpp index 52929bc84..c43663179 100644 --- a/trunk/src/app/srs_app_conn.cpp +++ b/trunk/src/app/srs_app_conn.cpp @@ -705,8 +705,11 @@ srs_error_t SrsSslConnection::read(void* plaintext, size_t nn_plaintext, ssize_t } int r0 = SSL_read(ssl, plaintext, nn); + int r1 = SSL_get_error(ssl, r0); + int r2 = BIO_ctrl_pending(bio_in); if (r0 <= 0) { - return srs_error_new(ERROR_HTTPS_READ, "SSL_read r0=%d, cache=%d, size=%d", r0, nn_padding, nn); + return srs_error_new(ERROR_HTTPS_READ, "SSL_read r0=%d, r1=%d, r2=%d, padding=%d, size=%d", + r0, r1, r2, nn_padding, nn); } srs_assert(r0 <= nn_plaintext); diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 0d7a5447d..7d11428f5 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -24,6 +24,6 @@ #ifndef SRS_CORE_VERSION4_HPP #define SRS_CORE_VERSION4_HPP -#define SRS_VERSION4_REVISION 48 +#define SRS_VERSION4_REVISION 49 #endif