mirror of
https://github.com/arut/nginx-rtmp-module.git
synced 2025-08-06 15:00:18 +08:00
SSL shutdown for rtmps.
While rtmp module does not support SSL, starting from nginx 1.25.5 an SSL connection can be passed from nginx stream pass module. Such connections should be shut down on connection closure. An rtmps example: rtmp { server { listen 1935; # rtmp application foo { live on; } } } stream { server { listen 1936 ssl; # rtmps ssl_certificate example.com.crt; ssl_certificate_key example.com.key; pass 127.0.0.1:1935; } }
This commit is contained in:
@ -258,6 +258,17 @@ ngx_rtmp_close_connection(ngx_connection_t *c)
|
|||||||
|
|
||||||
ngx_log_debug0(NGX_LOG_DEBUG_RTMP, c->log, 0, "close connection");
|
ngx_log_debug0(NGX_LOG_DEBUG_RTMP, c->log, 0, "close connection");
|
||||||
|
|
||||||
|
#if (NGX_SSL)
|
||||||
|
|
||||||
|
if (c->ssl) {
|
||||||
|
if (ngx_ssl_shutdown(c) == NGX_AGAIN) {
|
||||||
|
c->ssl->handler = ngx_rtmp_close_connection;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (NGX_STAT_STUB)
|
#if (NGX_STAT_STUB)
|
||||||
(void) ngx_atomic_fetch_add(ngx_stat_active, -1);
|
(void) ngx_atomic_fetch_add(ngx_stat_active, -1);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user