From 947162b699c48fbf37708429b5d0135ae9e72f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Wed, 13 Jan 2021 17:56:41 -0500 Subject: [PATCH] connectionManager: fix shutdown Since https://review.jami.net/c/ring-daemon/+/16668 handleControlPacket contains a shared_ptr to the mxsock pimpl. This means that closeConnectionsWith don't call the destructor like before and the shutdown is not triggered. So, force the shutdown to be called to fix testShutdownCallbacks() and call correctly all shutdown callbacks. Change-Id: I8aa8bec05650066261ac61d5fd42e1f20f99830a --- src/jamidht/connectionmanager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jamidht/connectionmanager.cpp b/src/jamidht/connectionmanager.cpp index f5b11a82f3..001605ad97 100644 --- a/src/jamidht/connectionmanager.cpp +++ b/src/jamidht/connectionmanager.cpp @@ -868,6 +868,8 @@ ConnectionManager::closeConnectionsWith(const DeviceId& deviceId) info->ice_->cancelOperations(); info->ice_->stop(); } + if (info->socket_) + info->socket_->shutdown(); info->responseCv_.notify_all(); if (info->ice_) { std::unique_lock<std::mutex> lk {info->mutex_}; -- GitLab