From b17f8207676d12c48978c0af56ef1f16ace25afe Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 27 Dec 2022 08:40:33 -0800 Subject: [PATCH] sharedpv: avoid deadlock on error path Need to unlock for all MonitorSetupOp methods --- src/sharedpv.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sharedpv.cpp b/src/sharedpv.cpp index 8652fe5..08a6876 100644 --- a/src/sharedpv.cpp +++ b/src/sharedpv.cpp @@ -92,6 +92,7 @@ struct SharedPV::Impl : public std::enable_shared_from_this self->subscribers.emplace(std::move(sub)); }catch(std::exception& e){ + UnGuard U(G); log_warn_printf(logshared, "%s Client %s: Can't attach() monitor: %s\n", conn->name().c_str(), conn->peerName().c_str(), e.what()); // not re-throwing for consistency