1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Cover more ST Coroutine code

This commit is contained in:
winlin 2019-04-07 13:52:16 +08:00
parent a9a720e32f
commit 3d5508e088
3 changed files with 100 additions and 9 deletions

View file

@ -101,8 +101,12 @@ srs_error_t SrsSTCoroutine::start()
srs_error_t err = srs_success;
if (started || disposed) {
err = srs_error_new(ERROR_THREAD_DISPOSED, "failed for disposed=%d, started=%d", disposed, started);
if (disposed) {
err = srs_error_new(ERROR_THREAD_DISPOSED, "disposed");
} else {
err = srs_error_new(ERROR_THREAD_STARTED, "started");
}
if (trd_err == srs_success) {
trd_err = srs_error_copy(err);
}