From f8da71b9c157c9eaec752060658fdecb82eaf86e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Wed, 15 Jun 2022 15:32:23 -0400 Subject: [PATCH] ice transport: cleanup Change-Id: Icdacf3ad7bb2161b81c1495f9d2a9cccee999794 --- src/ice_transport.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ice_transport.cpp b/src/ice_transport.cpp index a222cfe321..c44be21aa3 100644 --- a/src/ice_transport.cpp +++ b/src/ice_transport.cpp @@ -155,6 +155,8 @@ public: int flushTimerHeapAndIoQueue(); int checkEventQueue(int maxEventToPoll); + std::condition_variable_any iceCV_ {}; + std::string sessionName_ {}; std::unique_ptr<pj_pool_t, std::function<void(pj_pool_t*)>> pool_ {}; bool isTcp_ {false}; @@ -168,7 +170,6 @@ public: std::string local_ufrag_ {}; std::string local_pwd_ {}; pj_sockaddr remoteAddr_ {}; - std::condition_variable_any iceCV_ {}; pj_ice_strans_cfg config_ {}; std::string last_errmsg_ {}; @@ -233,7 +234,7 @@ public: mutable std::mutex sendDataMutex_ {}; std::condition_variable waitDataCv_ = {}; pj_size_t lastSentLen_ {0}; - std::atomic_bool destroying_ {false}; + bool destroying_ {false}; onShutdownCb scb {}; }; @@ -1707,7 +1708,7 @@ IceTransport::send(unsigned compId, const unsigned char* buf, size_t len) // bytes length). pimpl_->waitDataCv_.wait(dlk, [&] { return pimpl_->lastSentLen_ >= static_cast<pj_size_t>(len) - or pimpl_->destroying_.load(); + or pimpl_->destroying_; }); pimpl_->lastSentLen_ = 0; } else if (status != PJ_SUCCESS && status != PJ_EPENDING) { -- GitLab