mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug of edge, refine state to user state.
This commit is contained in:
parent
2bcaeccc51
commit
270b1270af
4 changed files with 35 additions and 12 deletions
|
@ -89,6 +89,9 @@ int SrsThread::start()
|
|||
return ret;
|
||||
}
|
||||
|
||||
// we set to loop to true for thread to run.
|
||||
loop = true;
|
||||
|
||||
// wait for cid to ready, for parent thread to get the cid.
|
||||
while (_cid < 0) {
|
||||
st_usleep(10 * SRS_TIME_MILLISECONDS);
|
||||
|
@ -130,7 +133,6 @@ void SrsThread::thread_cycle()
|
|||
srs_assert(handler);
|
||||
handler->on_thread_start();
|
||||
|
||||
loop = true;
|
||||
while (loop) {
|
||||
if ((ret = handler->on_before_cycle()) != ERROR_SUCCESS) {
|
||||
srs_warn("thread on before cycle failed, ignored and retry, ret=%d", ret);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue