mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine code, publish recv thread sleep 697ms
This commit is contained in:
parent
e9712cc627
commit
6f963b50f3
1 changed files with 3 additions and 3 deletions
|
@ -750,9 +750,9 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
|
|||
|
||||
int64_t nb_msgs = 0;
|
||||
while (true) {
|
||||
// use small loop to check the error code, interval = 30s/100 = 300ms.
|
||||
for (int i = 0; i < 100; i++) {
|
||||
st_usleep(SRS_CONSTS_RTMP_RECV_TIMEOUT_US / 100);
|
||||
// use small loop to check the error code, interval = 30s/43 = 697ms.
|
||||
for (int i = 0; i < 43; i++) {
|
||||
st_usleep(SRS_CONSTS_RTMP_RECV_TIMEOUT_US / 43);
|
||||
|
||||
// check the thread error code.
|
||||
if ((ret = trd->error_code()) != ERROR_SUCCESS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue