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

for bug #237, never sleep when thread interval is 0.

This commit is contained in:
winlin 2014-12-02 19:22:06 +08:00
parent 6f963b50f3
commit 24a6a723ee
2 changed files with 7 additions and 3 deletions

View file

@ -179,8 +179,12 @@ failed:
break;
}
// to improve performance, donot sleep when interval is zero.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/237
if (cycle_interval_us > 0) {
st_usleep(cycle_interval_us);
}
}
handler->on_thread_stop();
srs_info("thread cycle finished");