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

RTC: Limit the ARQ for DTLS

This commit is contained in:
winlin 2020-08-19 21:28:06 +08:00
parent 1ffea2bcc5
commit 036cc2a7a2
2 changed files with 135 additions and 2 deletions

View file

@ -677,8 +677,9 @@ srs_error_t SrsDtlsClientImpl::cycle()
// The first ARQ delay.
srs_usleep(arq_first);
while (true) {
srs_info("arq cycle, state=%u", state_);
// Limit the max retry for ARQ.
for (int arq_retry_left = 7; arq_retry_left > 0; arq_retry_left--) {
srs_info("arq cycle, state=%u, retry=%d", state_, arq_retry_left);
// We ignore any error for ARQ thread.
if ((err = trd->pull()) != srs_success) {