-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Live: Crash for invalid live stream state when unmount HTTP. v6.0.146…
… v7.0.3 (#4141) 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>
- Loading branch information
1 parent
16e569d
commit 38417d9
Showing
4 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,6 @@ | |
|
||
#define VERSION_MAJOR 6 | ||
#define VERSION_MINOR 0 | ||
#define VERSION_REVISION 145 | ||
#define VERSION_REVISION 146 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,6 @@ | |
|
||
#define VERSION_MAJOR 7 | ||
#define VERSION_MINOR 0 | ||
#define VERSION_REVISION 2 | ||
#define VERSION_REVISION 3 | ||
|
||
#endif |