Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ping_reset bad check #354

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ubifred
Copy link

@ubifred ubifred commented Dec 9, 2022

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

[1] 345a00f

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`

[1] sergey-dryabzhinsky@345a00f
@ubifred
Copy link
Author

ubifred commented Dec 9, 2022

This PR shall fix #353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant