ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.84k stars 5.39k forks source link

After the stream is triggered to dispose, subsequent attempts to push the stream will continuously fail. #4210

Open retamia opened 1 month ago

retamia commented 1 month ago

!!! Before submitting a new bug report, please ensure you have searched for any existing bugs. Duplicate issues or questions that are overly simple or already addressed in the documentation will be removed without any response.

Describe the bug

serve error code=1098(StreamDisposing)(Stream is disposing)

After the stream is triggered to dispose, subsequent attempts to push the stream will continuously fail.

Version 6.0release

Additional context

SrsRtmpConn::publishing -> acquire_publish -> SrsLiveSource::on_publish

The SrsLiveSource::on_publish function changed the value of can_publish_ to false and returned an error (serve error code=1098(StreamDisposing)(Stream is disposing) : service cycle : rtmp: stream service : handle publish : http mount : stream is disposing). Because an error was returned, the SrsRtmpConn::publishing function did not call release_publish, resulting in can_publish_ remaining false.

Subsequently, when attempting to stream again, because can_publish_ is set to false, all subsequent streaming attempts will fail.

TRANS_BY_GPT4