From aef6e670bd4cb6ff26c46ba7eae8cc7b00bc6b62 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 15 Aug 2024 12:28:55 -0600 Subject: [PATCH] fix: Locking fix for RPC subsystem. --- app/src/studio/rpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/studio/rpc.c b/app/src/studio/rpc.c index 3d5bfcd7a1ac..8dfb025d5f89 100644 --- a/app/src/studio/rpc.c +++ b/app/src/studio/rpc.c @@ -245,7 +245,7 @@ static void refresh_selected_transport(void) { k_mutex_lock(&rpc_transport_mutex, K_FOREVER); if (selected_transport && selected_transport->transport == transport) { - return; + goto exit_refresh; } if (selected_transport) { @@ -272,6 +272,7 @@ static void refresh_selected_transport(void) { LOG_WRN("Failed to select a transport!"); } +exit_refresh: k_mutex_unlock(&rpc_transport_mutex); }