From 6f963b50f3e54426b76fd5e172baaea81597071e Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 2 Dec 2014 18:19:01 +0800 Subject: [PATCH] refine code, publish recv thread sleep 697ms --- trunk/src/app/srs_app_rtmp_conn.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trunk/src/app/srs_app_rtmp_conn.cpp b/trunk/src/app/srs_app_rtmp_conn.cpp index 1297c9459..d9fac15a0 100644 --- a/trunk/src/app/srs_app_rtmp_conn.cpp +++ b/trunk/src/app/srs_app_rtmp_conn.cpp @@ -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) {