Skip to content

Commit 472c339

Browse files
committed
[fix] added a check to avoid triggering push reconnect.
`ngx_rtmp_relay_push` may be called in `ngx_rtmp_notify_publish_handle`, so push reconnect may be triggered, but `on_publish` is not related to `push`.
1 parent 23d1bd0 commit 472c339

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ngx_rtmp_relay_module.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,10 @@ ngx_rtmp_relay_push_reconnect(ngx_event_t *ev)
282282
return;
283283
}
284284

285+
if (ctx->tag != &ngx_rtmp_relay_module) {
286+
return;
287+
}
288+
285289
t = racf->pushes.elts;
286290
for (n = 0; n < racf->pushes.nelts; ++n, ++t) {
287291
target = *t;

0 commit comments

Comments
 (0)