mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
When unpublishing, the handler callback that will stop the coroutine: ```cpp _can_publish = true; handler->on_unpublish(req); ``` In this handler, the `http_unmount` will be called: ```cpp void SrsHttpStreamServer::http_unmount(SrsRequest* r) cache->stop(); ``` In this `http_unmount` function, there could be context switching. In such a situation, a new connection might publish the stream while the unpublish process is freeing the stream, leading to a crash. To prevent a new publisher, we should change the state only after all handlers and hooks are completed. --------- Co-authored-by: liumengte <liumengte@visionular.com> Co-authored-by: winlin <winlinvip@gmail.com> |
||
---|---|---|
.. | ||
Architecture.md | ||
CHANGELOG.md | ||
Dockers.md | ||
Features.md | ||
ffmpeg-logo.png | ||
ffmpeg-min.png | ||
PERFORMANCE.md | ||
README.md | ||
readme.txt | ||
Resources.md | ||
source.200kbps.768x320.flv | ||
source.flv | ||
srs-logo.ico | ||
srs-logo.png |