1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #1657, fix the http read bug

This commit is contained in:
winlin 2020-11-06 19:42:22 +08:00
parent c5be7ce8f4
commit c3f23f4c23
2 changed files with 5 additions and 2 deletions

View file

@ -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);

View file

@ -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