From d4d11c2c188347271cefd8979a6541f83281e8fb Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 9 Mar 2021 22:19:32 +0800 Subject: [PATCH] DTLS: Change max loop to larger --- trunk/src/app/srs_app_rtc_dtls.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_rtc_dtls.cpp b/trunk/src/app/srs_app_rtc_dtls.cpp index 59b563f57..a528f2631 100644 --- a/trunk/src/app/srs_app_rtc_dtls.cpp +++ b/trunk/src/app/srs_app_rtc_dtls.cpp @@ -826,7 +826,8 @@ srs_error_t SrsDtlsClientImpl::cycle() // 50ms, 100ms, 200ms, 400ms, 800ms, (1000ms,600ms), (200ms,1000ms,1000ms,1000ms), // (400ms,1000ms,1000ms,1000ms,1000ms,1000ms,1000ms), ... // So when the max ARQ limit to 12 times, the max loop is about 103. - const int max_loop = 103; + // @remark We change the max sleep to 100ms, so we limit about (103*10)/2=500. + const int max_loop = 512; int arq_count = 0; for (int i = 0; arq_count < arq_max_retry && i < max_loop; i++) {