Commit 1ceec4d7 authored by Sébastien Blin's avatar Sébastien Blin

multiplexed_socket: avoid deadlock on cbMtx_

cbMtx_ is locked when onStateChangeCb_ is called. And onTlsStateChange
can call shutdown() which MUST NOT relock cbMtx_.

Change-Id: Ice8265b9a70f920a4f04451c19a752f260ef71b7
parent 232e133f
......@@ -52,6 +52,7 @@ public:
~Impl() {
if (!isShutdown_) {
if (endpoint) endpoint->setOnStateChange({});
} else {
std::lock_guard<std::mutex> lkSockets(socketsMutex);
......@@ -68,7 +69,6 @@ public:
isShutdown_ = true;
if (onShutdown_) onShutdown_();
if (endpoint) {
std::unique_lock<std::mutex> lk(writeMtx);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment