When an RTMP connection become stall (no more IO), the ngx_rmtp_ping send a ping request to the client, but during this sending the ping_reset flag is set to 1 in ngx_rtmp_send (because of [1]) preventing the detection of a not responding connection because in ngx_rmtp_ping() the ping_reset check will then reset the ping instead of finalizing the session.
This patch ensure that ping_reset is not set to 1 in both ngx_rtmp_recv() and ngx_rtmp_send() when a PING test is ongoing ping_active = 1
When an RTMP connection become stall (no more IO), the
ngx_rmtp_ping
send a ping request to the client, but during this sending theping_reset
flag is set to 1 inngx_rtmp_send
(because of [1]) preventing the detection of a not responding connection because inngx_rmtp_ping()
theping_reset
check will then reset the ping instead of finalizing the session.This patch ensure that
ping_reset
is not set to 1 in bothngx_rtmp_recv()
andngx_rtmp_send()
when a PING test is ongoingping_active = 1
[1] https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/commit/345a00f9a30b460295e2c1dc25e3240e64361814