From dc80916b27019701eb5fe0a92536a85066b2ecdd Mon Sep 17 00:00:00 2001 From: Yu Tongqing Date: Fri, 13 Sep 2024 15:54:38 +0800 Subject: [PATCH] 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 --- src/switch_core_io.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/switch_core_io.c b/src/switch_core_io.c index 9931f0f3ef7..23f271fb289 100644 --- a/src/switch_core_io.c +++ b/src/switch_core_io.c @@ -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; }