mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1634, always check status in thread loop. 3.0.126
This commit is contained in:
parent
6c55fd3e4b
commit
c1e07d6a96
8 changed files with 47 additions and 38 deletions
|
@ -83,16 +83,18 @@ srs_error_t SrsNgExec::cycle()
|
|||
srs_error_t err = srs_success;
|
||||
|
||||
while (true) {
|
||||
if ((err = do_cycle()) != srs_success) {
|
||||
srs_warn("EXEC: Ignore error, %s", srs_error_desc(err).c_str());
|
||||
srs_freep(err);
|
||||
}
|
||||
|
||||
// We always check status first.
|
||||
// @see https://github.com/ossrs/srs/issues/1634#issuecomment-597571561
|
||||
if ((err = trd->pull()) != srs_success) {
|
||||
err = srs_error_wrap(err, "ng exec cycle");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if ((err = do_cycle()) != srs_success) {
|
||||
srs_warn("EXEC: Ignore error, %s", srs_error_desc(err).c_str());
|
||||
srs_freep(err);
|
||||
}
|
||||
|
||||
srs_usleep(SRS_RTMP_EXEC_CIMS);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue