From 8d445969b8a33af539ecdafa389e789961435d55 Mon Sep 17 00:00:00 2001 From: Gordon Date: Mon, 27 Mar 2023 19:25:11 +0800 Subject: [PATCH] fix turn permission delay 2s --- src/source/Ice/TurnConnection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/source/Ice/TurnConnection.c b/src/source/Ice/TurnConnection.c index fe01b3b0f5..32f7fe1c76 100644 --- a/src/source/Ice/TurnConnection.c +++ b/src/source/Ice/TurnConnection.c @@ -1018,7 +1018,7 @@ STATUS turnConnectionStepState(PTurnConnection pTurnConnection) CHK(FALSE, retStatus); } - if (currentTime >= pTurnConnection->stateTimeoutTime) { + if (currentTime >= pTurnConnection->stateTimeoutTime || channelWithPermissionCount == pTurnConnection->turnPeerCount) { CHK(channelWithPermissionCount > 0, STATUS_TURN_CONNECTION_FAILED_TO_CREATE_PERMISSION); // go to next state if we have at least one ready peer