Skip to content
Snippets Groups Projects
Commit f8da71b9 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

ice transport: cleanup

Change-Id: Icdacf3ad7bb2161b81c1495f9d2a9cccee999794
parent 2d9c27d3
Branches
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment