Skip to content

Conversation

@ossrs-ai
Copy link
Contributor

@ossrs-ai ossrs-ai commented Nov 14, 2025

Problem: Newly created sources (RTMP/SRT/RTC/RTSP) were being immediately marked as "dead" and deleted by the cleanup timer before publishers could connect, causing "new live source, dead=1" errors.

Root Cause: All source constructors initialized stream_die_at_ = 0, causing stream_is_dead() to return true immediately since current time was always greater than 0 + 3 seconds.

Solution: Changed all four source constructors to initialize stream_die_at_ = srs_time_now_cached(), giving newly created sources a proper 3-second grace period before cleanup.

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Nov 14, 2025
@winlinvip winlinvip changed the title Bug/source AI: Fix race condition causing immediate deletion of new sources. v7.0.127 (#4449) Nov 14, 2025
@winlinvip winlinvip merged commit a3a2fa5 into ossrs:develop Nov 14, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EnglishNative This issue is conveyed exclusively in English.

Development

Successfully merging this pull request may close these issues.

2 participants