mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-07-29 20:17:37 +02:00
Remove unnecessary get_cancellation_slot().clear() calls
Summary: related to T13706 Reviewers: ivica Reviewed By: ivica Subscribers: miljen, iljazovic Differential Revision: https://repo.mireo.local/D27894
This commit is contained in:
@ -381,8 +381,6 @@ public:
|
||||
|
||||
private:
|
||||
void complete(error_code ec) {
|
||||
get_cancellation_slot().clear();
|
||||
|
||||
std::move(_handler)(ec);
|
||||
}
|
||||
|
||||
|
@ -102,14 +102,10 @@ public:
|
||||
|
||||
private:
|
||||
void complete(error_code ec, epoints eps, authority_path ap) {
|
||||
get_cancellation_slot().clear();
|
||||
|
||||
std::move(_handler)(ec, std::move(eps), std::move(ap));
|
||||
}
|
||||
|
||||
void complete_post(error_code ec, epoints eps, authority_path ap) {
|
||||
get_cancellation_slot().clear();
|
||||
|
||||
asio::post(
|
||||
_owner.get_executor(),
|
||||
asio::prepend(
|
||||
|
@ -67,8 +67,6 @@ public:
|
||||
}
|
||||
|
||||
void operator()(on_timer, error_code) {
|
||||
get_cancellation_slot().clear();
|
||||
|
||||
if (
|
||||
_cancellation_state.cancelled() == asio::cancellation_type::terminal ||
|
||||
!_svc_ptr->is_open()
|
||||
@ -95,8 +93,6 @@ public:
|
||||
}
|
||||
|
||||
void operator()(on_pingreq, error_code ec) {
|
||||
get_cancellation_slot().clear();
|
||||
|
||||
if (
|
||||
_cancellation_state.cancelled() == asio::cancellation_type::terminal ||
|
||||
ec == asio::error::no_recovery
|
||||
|
@ -184,10 +184,7 @@ public:
|
||||
|
||||
private:
|
||||
void complete(error_code ec) {
|
||||
get_cancellation_slot().clear();
|
||||
|
||||
_owner._conn_mtx.unlock();
|
||||
|
||||
std::move(_handler)(ec);
|
||||
}
|
||||
};
|
||||
|
@ -61,8 +61,6 @@ public:
|
||||
}
|
||||
|
||||
void operator()(on_timer, error_code ec) {
|
||||
get_cancellation_slot().clear();
|
||||
|
||||
if (ec == asio::error::operation_aborted || !_svc_ptr->is_open())
|
||||
return;
|
||||
|
||||
@ -81,8 +79,6 @@ public:
|
||||
}
|
||||
|
||||
void operator()(on_disconnect, error_code ec) {
|
||||
get_cancellation_slot().clear();
|
||||
|
||||
if (!ec)
|
||||
perform();
|
||||
}
|
||||
|
@ -70,8 +70,6 @@ public:
|
||||
|
||||
template <typename CompletionHandler>
|
||||
void operator()(on_timer, CompletionHandler&& h, error_code ec) {
|
||||
get_cancellation_slot().clear();
|
||||
|
||||
auto bh = std::apply(
|
||||
[h = std::move(h)](auto&&... args) mutable {
|
||||
return asio::append(std::move(h), std::move(args)...);
|
||||
|
Reference in New Issue
Block a user