AI: HTTPS: Handle SSL_ERROR_ZERO_RETURN as graceful connection closure. v7.0.108 (#4036)
This commit is contained in:
parent
5fc1f2d2e5
commit
19b603a0d7
|
|
@ -7,6 +7,7 @@ The changelog for SRS.
|
||||||
<a name="v7-changes"></a>
|
<a name="v7-changes"></a>
|
||||||
|
|
||||||
## SRS 7.0 Changelog
|
## SRS 7.0 Changelog
|
||||||
|
* v7.0, 2025-10-26, AI: HTTPS: Handle SSL_ERROR_ZERO_RETURN as graceful connection closure. v7.0.108 (#4036)
|
||||||
* v7.0, 2025-10-26, AI: API: Add clients field to on_play/on_stop webhooks and total field to HTTP API. v7.0.107 (#4147)
|
* v7.0, 2025-10-26, AI: API: Add clients field to on_play/on_stop webhooks and total field to HTTP API. v7.0.107 (#4147)
|
||||||
* v7.0, 2025-10-26, AI: WebRTC: Fix camera/microphone not released after closing publisher. v7.0.106 (#4261)
|
* v7.0, 2025-10-26, AI: WebRTC: Fix camera/microphone not released after closing publisher. v7.0.106 (#4261)
|
||||||
* v7.0, 2025-10-26, AI: Build: Improve dependency checking to report all missing dependencies at once. v7.0.105 (#4293)
|
* v7.0, 2025-10-26, AI: Build: Improve dependency checking to report all missing dependencies at once. v7.0.105 (#4293)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#define VERSION_MAJOR 7
|
#define VERSION_MAJOR 7
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 107
|
#define VERSION_REVISION 108
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -533,6 +533,12 @@ srs_error_t SrsSslConnection::read(void *plaintext, size_t nn_plaintext, ssize_t
|
||||||
int r2 = BIO_ctrl_pending(bio_in_);
|
int r2 = BIO_ctrl_pending(bio_in_);
|
||||||
int r3 = SSL_is_init_finished(ssl_);
|
int r3 = SSL_is_init_finished(ssl_);
|
||||||
|
|
||||||
|
// Peer gracefully close.
|
||||||
|
if (r0 == 0 && r1 == SSL_ERROR_ZERO_RETURN) {
|
||||||
|
return srs_error_new(ERROR_SOCKET_READ, "SSL_read r0=%d, r1=%d, r2=%d, r3=%d",
|
||||||
|
r0, r1, r2, r3);
|
||||||
|
}
|
||||||
|
|
||||||
// OK, got data.
|
// OK, got data.
|
||||||
if (r0 > 0) {
|
if (r0 > 0) {
|
||||||
srs_assert(r0 <= (int)nn_plaintext);
|
srs_assert(r0 <= (int)nn_plaintext);
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,12 @@ srs_error_t SrsSslClient::read(void *plaintext, size_t nn_plaintext, ssize_t *nr
|
||||||
int r2 = BIO_ctrl_pending(bio_in_);
|
int r2 = BIO_ctrl_pending(bio_in_);
|
||||||
int r3 = SSL_is_init_finished(ssl_);
|
int r3 = SSL_is_init_finished(ssl_);
|
||||||
|
|
||||||
|
// Peer gracefully close.
|
||||||
|
if (r0 == 0 && r1 == SSL_ERROR_ZERO_RETURN) {
|
||||||
|
return srs_error_new(ERROR_SOCKET_READ, "SSL_read r0=%d, r1=%d, r2=%d, r3=%d",
|
||||||
|
r0, r1, r2, r3);
|
||||||
|
}
|
||||||
|
|
||||||
// OK, got data.
|
// OK, got data.
|
||||||
if (r0 > 0) {
|
if (r0 > 0) {
|
||||||
srs_assert(r0 <= (int)nn_plaintext);
|
srs_assert(r0 <= (int)nn_plaintext);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user