no need to unlock and lock again

the lock session->bug_rwlock has already been locked in write mode, no need to unlock and then lock again
This commit is contained in:
Yu Tongqing 2024-09-13 15:54:38 +08:00 committed by GitHub
parent 94b8ebaea7
commit dc80916b27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 3 deletions

View File

@ -457,9 +457,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
if (switch_core_codec_ready(&session->bug_codec)) {
use_codec = &session->bug_codec;
}
switch_thread_rwlock_unlock(session->bug_rwlock);
switch_thread_rwlock_wrlock(session->bug_rwlock);
if (!session->bugs) {
do_bugs = 0;
}