diff --git a/include/mqtt/endpoint.hpp b/include/mqtt/endpoint.hpp index ee328958e..8e1920872 100644 --- a/include/mqtt/endpoint.hpp +++ b/include/mqtt/endpoint.hpp @@ -6841,6 +6841,12 @@ class endpoint : public std::enable_shared_from_this 0) { + LockGuard lck (ep_.topic_alias_send_mtx_); + ep_.topic_alias_send_.emplace(ta_opt.value()); + } + } if (ep_.on_v5_connect( force_move(client_id_), force_move(user_name_), @@ -6992,6 +6998,7 @@ class endpoint : public std::enable_shared_from_this 0) { + LockGuard lck (ep_.topic_alias_send_mtx_); ep_.topic_alias_send_.emplace(ta_opt.value()); } }