Skip to content

Commit

Permalink
fix turn permission delay 2s (#1675)
Browse files Browse the repository at this point in the history
* fix turn permission delay 2s

* Fix the clang-format

Fix the clang-format use ./scripts/clang-format.sh -d src/
  • Loading branch information
vc60er authored Apr 7, 2023
1 parent 3dd633e commit 5b15538
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/source/Ice/TurnConnection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5b15538

Please sign in to comment.