Skip to content

Commit

Permalink
Fixed in_strand().
Browse files Browse the repository at this point in the history
  • Loading branch information
redboltz committed Jan 8, 2024
1 parent 808b2f2 commit 558999d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/async_mqtt/broker/endpoint_variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ class epsp_wrap {
);
}

bool running_in_this_thread() const {
bool in_strand() const {
return visit(
[&](auto& ep) -> bool {
return ep.strand().running_in_this_thread();
return ep.in_strand();
}
);
}
Expand Down
2 changes: 1 addition & 1 deletion include/async_mqtt/broker/offline_message.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class offline_message {

template <typename Epsp>
bool send(Epsp epsp, protocol_version ver) {
BOOST_ASSERT(epsp.running_in_this_thread());
BOOST_ASSERT(epsp.in_strand());
auto publish =
[&] (packet_id_t pid) {
switch (ver) {
Expand Down

0 comments on commit 558999d

Please sign in to comment.